mirror of
https://github.com/InsanusMokrassar/KSLog.git
synced 2024-12-22 14:07:15 +00:00
perestroika
This commit is contained in:
parent
3d5896fc65
commit
199b7515e6
72
build.gradle
72
build.gradle
@ -10,18 +10,76 @@ buildscript {
|
|||||||
classpath libs.android.tools.build
|
classpath libs.android.tools.build
|
||||||
classpath libs.android.dexcount
|
classpath libs.android.dexcount
|
||||||
classpath libs.kotlin.gradle.plugin
|
classpath libs.kotlin.gradle.plugin
|
||||||
classpath libs.kotlin.serialization.plugin
|
|
||||||
classpath libs.kotlin.dokka.plugin
|
classpath libs.kotlin.dokka.plugin
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
allprojects {
|
|
||||||
repositories {
|
plugins {
|
||||||
mavenLocal()
|
alias(libs.plugins.kotlin.multiplatform)
|
||||||
mavenCentral()
|
alias(libs.plugins.kotlin.dokka)
|
||||||
google()
|
}
|
||||||
|
|
||||||
|
apply plugin: "com.android.library"
|
||||||
|
|
||||||
|
project.version = "$version"
|
||||||
|
project.group = "$group"
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
mavenLocal()
|
||||||
|
mavenCentral()
|
||||||
|
google()
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
jvm()
|
||||||
|
js (IR) {
|
||||||
|
browser()
|
||||||
|
nodejs()
|
||||||
|
}
|
||||||
|
android {
|
||||||
|
publishAllLibraryVariants()
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
commonMain {
|
||||||
|
dependencies {
|
||||||
|
implementation libs.kotlin
|
||||||
|
}
|
||||||
|
}
|
||||||
|
commonTest {
|
||||||
|
dependencies {
|
||||||
|
implementation libs.kotlin.test.common
|
||||||
|
implementation libs.kotlin.test.annotations.common
|
||||||
|
}
|
||||||
|
}
|
||||||
|
jvmTest {
|
||||||
|
dependencies {
|
||||||
|
implementation libs.kotlin.test.junit
|
||||||
|
}
|
||||||
|
}
|
||||||
|
jsTest {
|
||||||
|
dependencies {
|
||||||
|
implementation libs.kotlin.test.js
|
||||||
|
implementation libs.kotlin.test.junit
|
||||||
|
}
|
||||||
|
}
|
||||||
|
androidTest {
|
||||||
|
dependencies {
|
||||||
|
implementation libs.kotlin.test.junit
|
||||||
|
implementation libs.android.test.junit
|
||||||
|
implementation libs.android.test.espresso.core
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "./extensions.gradle"
|
java {
|
||||||
|
toolchain {
|
||||||
|
languageVersion = JavaLanguageVersion.of(8)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
apply from: "defaultAndroidSettings.gradle"
|
||||||
|
|
||||||
// apply from: "./github_release.gradle"
|
// apply from: "./github_release.gradle"
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
allprojects {
|
|
||||||
ext {
|
|
||||||
projectByName = { String name ->
|
|
||||||
for (subproject in rootProject.subprojects) {
|
|
||||||
if (subproject.name == name) {
|
|
||||||
return subproject
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
|
|
||||||
internalProject = { String name ->
|
|
||||||
projectByName(name)
|
|
||||||
}
|
|
||||||
|
|
||||||
mppProjectWithSerializationPresetPath = "${rootProject.projectDir.absolutePath}/mppProjectWithSerialization.gradle"
|
|
||||||
mppJavaProjectPresetPath = "${rootProject.projectDir.absolutePath}/mppJavaProject.gradle"
|
|
||||||
mppJsProjectPresetPath = "${rootProject.projectDir.absolutePath}/mppJsProject.gradle"
|
|
||||||
mppAndroidProjectPresetPath = "${rootProject.projectDir.absolutePath}/mppAndroidProject.gradle"
|
|
||||||
|
|
||||||
defaultAndroidSettingsPresetPath = "${rootProject.projectDir.absolutePath}/defaultAndroidSettings.gradle"
|
|
||||||
|
|
||||||
// publishGradlePath = "${rootProject.projectDir.absolutePath}/publish.gradle"
|
|
||||||
}
|
|
||||||
}
|
|
@ -8,6 +8,6 @@ android.enableJetifier=true
|
|||||||
|
|
||||||
# Project data
|
# Project data
|
||||||
|
|
||||||
group=dev.akkihi
|
group=dev.inmo
|
||||||
version=0.0.1
|
version=0.0.1
|
||||||
android_code_version=1
|
android_code_version=1
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
[versions]
|
[versions]
|
||||||
|
|
||||||
kotlin = "1.6.21"
|
kotlin = "1.6.21"
|
||||||
kotlin-serialization = "1.3.3"
|
|
||||||
kotlin-gradle-plugin = "7.0.4"
|
kotlin-gradle-plugin = "7.0.4"
|
||||||
|
|
||||||
dexcount = "3.1.0"
|
dexcount = "3.1.0"
|
||||||
@ -16,7 +15,6 @@ android-buildTools = "32.0.0"
|
|||||||
[libraries]
|
[libraries]
|
||||||
|
|
||||||
kotlin = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
|
kotlin = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
|
||||||
kotlin-serialization = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlin-serialization" }
|
|
||||||
kotlin-test-common = { module = "org.jetbrains.kotlin:kotlin-test-common", version.ref = "kotlin" }
|
kotlin-test-common = { module = "org.jetbrains.kotlin:kotlin-test-common", version.ref = "kotlin" }
|
||||||
kotlin-test-annotations-common = { module = "org.jetbrains.kotlin:kotlin-test-annotations-common", version.ref = "kotlin" }
|
kotlin-test-annotations-common = { module = "org.jetbrains.kotlin:kotlin-test-annotations-common", version.ref = "kotlin" }
|
||||||
kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" }
|
kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" }
|
||||||
@ -29,10 +27,9 @@ android-test-espresso-core = { module = "androidx.test.espresso:espresso-core",
|
|||||||
android-tools-build = { module = "com.android.tools.build:gradle", version.ref = "kotlin-gradle-plugin" }
|
android-tools-build = { module = "com.android.tools.build:gradle", version.ref = "kotlin-gradle-plugin" }
|
||||||
android-dexcount = { module = "com.getkeepsafe.dexcount:dexcount-gradle-plugin", version.ref = "dexcount" }
|
android-dexcount = { module = "com.getkeepsafe.dexcount:dexcount-gradle-plugin", version.ref = "dexcount" }
|
||||||
kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
|
kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
|
||||||
kotlin-serialization-plugin = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlin" }
|
|
||||||
kotlin-dokka-plugin = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "kotlin" }
|
kotlin-dokka-plugin = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "kotlin" }
|
||||||
|
|
||||||
[plugins]
|
[plugins]
|
||||||
|
|
||||||
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
|
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
|
||||||
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
|
kotlin-dokka = { id = "org.jetbrains.dokka", version.ref = "kotlin" }
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
plugins {
|
|
||||||
id "org.jetbrains.kotlin.multiplatform"
|
|
||||||
id "org.jetbrains.kotlin.plugin.serialization"
|
|
||||||
id "com.android.library"
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: "$mppProjectWithSerializationPresetPath"
|
|
||||||
|
|
@ -1 +0,0 @@
|
|||||||
<manifest package="dev.akkihi.lib"/>
|
|
@ -1,34 +0,0 @@
|
|||||||
project.version = "$version"
|
|
||||||
project.group = "$group"
|
|
||||||
|
|
||||||
// apply from: "$publishGradlePath"
|
|
||||||
|
|
||||||
kotlin {
|
|
||||||
android {
|
|
||||||
publishAllLibraryVariants()
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceSets {
|
|
||||||
commonMain {
|
|
||||||
dependencies {
|
|
||||||
implementation libs.kotlin
|
|
||||||
api libs.kotlin.serialization
|
|
||||||
}
|
|
||||||
}
|
|
||||||
commonTest {
|
|
||||||
dependencies {
|
|
||||||
implementation libs.kotlin.test.common
|
|
||||||
implementation libs.kotlin.test.annotations.common
|
|
||||||
}
|
|
||||||
}
|
|
||||||
androidTest {
|
|
||||||
dependencies {
|
|
||||||
implementation libs.kotlin.test.junit
|
|
||||||
implementation libs.android.test.junit
|
|
||||||
implementation libs.android.test.espresso.core
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: "$defaultAndroidSettingsPresetPath"
|
|
@ -1,34 +0,0 @@
|
|||||||
project.version = "$version"
|
|
||||||
project.group = "$group"
|
|
||||||
|
|
||||||
// apply from: "$publishGradlePath"
|
|
||||||
|
|
||||||
kotlin {
|
|
||||||
jvm()
|
|
||||||
|
|
||||||
sourceSets {
|
|
||||||
commonMain {
|
|
||||||
dependencies {
|
|
||||||
implementation libs.kotlin
|
|
||||||
api libs.kotlin.serialization
|
|
||||||
}
|
|
||||||
}
|
|
||||||
commonTest {
|
|
||||||
dependencies {
|
|
||||||
implementation libs.kotlin.test.common
|
|
||||||
implementation libs.kotlin.test.annotations.common
|
|
||||||
}
|
|
||||||
}
|
|
||||||
jvmTest {
|
|
||||||
dependencies {
|
|
||||||
implementation libs.kotlin.test.junit
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
java {
|
|
||||||
toolchain {
|
|
||||||
languageVersion = JavaLanguageVersion.of(8)
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,32 +0,0 @@
|
|||||||
project.version = "$version"
|
|
||||||
project.group = "$group"
|
|
||||||
|
|
||||||
// apply from: "$publishGradlePath"
|
|
||||||
|
|
||||||
kotlin {
|
|
||||||
js (IR) {
|
|
||||||
browser()
|
|
||||||
nodejs()
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceSets {
|
|
||||||
commonMain {
|
|
||||||
dependencies {
|
|
||||||
implementation libs.kotlin
|
|
||||||
api libs.kotlin.serialization
|
|
||||||
}
|
|
||||||
}
|
|
||||||
commonTest {
|
|
||||||
dependencies {
|
|
||||||
implementation libs.kotlin.test.common
|
|
||||||
implementation libs.kotlin.test.annotations.common
|
|
||||||
}
|
|
||||||
}
|
|
||||||
jsTest {
|
|
||||||
dependencies {
|
|
||||||
implementation libs.kotlin.test.js
|
|
||||||
implementation libs.kotlin.test.junit
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,56 +0,0 @@
|
|||||||
project.version = "$version"
|
|
||||||
project.group = "$group"
|
|
||||||
|
|
||||||
// apply from: "$publishGradlePath"
|
|
||||||
|
|
||||||
kotlin {
|
|
||||||
jvm()
|
|
||||||
js (IR) {
|
|
||||||
browser()
|
|
||||||
nodejs()
|
|
||||||
}
|
|
||||||
android {
|
|
||||||
publishAllLibraryVariants()
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceSets {
|
|
||||||
commonMain {
|
|
||||||
dependencies {
|
|
||||||
implementation libs.kotlin
|
|
||||||
api libs.kotlin.serialization
|
|
||||||
}
|
|
||||||
}
|
|
||||||
commonTest {
|
|
||||||
dependencies {
|
|
||||||
implementation libs.kotlin.test.common
|
|
||||||
implementation libs.kotlin.test.annotations.common
|
|
||||||
}
|
|
||||||
}
|
|
||||||
jvmTest {
|
|
||||||
dependencies {
|
|
||||||
implementation libs.kotlin.test.junit
|
|
||||||
}
|
|
||||||
}
|
|
||||||
jsTest {
|
|
||||||
dependencies {
|
|
||||||
implementation libs.kotlin.test.js
|
|
||||||
implementation libs.kotlin.test.junit
|
|
||||||
}
|
|
||||||
}
|
|
||||||
androidTest {
|
|
||||||
dependencies {
|
|
||||||
implementation libs.kotlin.test.junit
|
|
||||||
implementation libs.android.test.junit
|
|
||||||
implementation libs.android.test.espresso.core
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
java {
|
|
||||||
toolchain {
|
|
||||||
languageVersion = JavaLanguageVersion.of(8)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: "$defaultAndroidSettingsPresetPath"
|
|
@ -1,18 +1,3 @@
|
|||||||
rootProject.name = 'truth_simple_kmp_logger'
|
rootProject.name = 'kslog'
|
||||||
|
|
||||||
String[] includes = [
|
|
||||||
":logger"
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
includes.each { originalName ->
|
|
||||||
String projectDirectory = "${rootProject.projectDir.getAbsolutePath()}${originalName.replace(":", File.separator)}"
|
|
||||||
String projectName = "${rootProject.name}${originalName.replace(":", ".")}"
|
|
||||||
String projectIdentifier = ":${projectName}"
|
|
||||||
include projectIdentifier
|
|
||||||
ProjectDescriptor project = project(projectIdentifier)
|
|
||||||
project.name = projectName
|
|
||||||
project.projectDir = new File(projectDirectory)
|
|
||||||
}
|
|
||||||
|
|
||||||
enableFeaturePreview("VERSION_CATALOGS")
|
enableFeaturePreview("VERSION_CATALOGS")
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package truth.simple.kmp.logger.common
|
package dev.inmo.kslog.common
|
||||||
|
|
||||||
|
|
||||||
enum class LogLevel {
|
enum class LogLevel {
|
@ -1,4 +1,4 @@
|
|||||||
package truth.simple.kmp.logger.common
|
package dev.inmo.kslog.common
|
||||||
|
|
||||||
fun Logger(
|
fun Logger(
|
||||||
messageFormatter: (l: LogLevel, m: String, t: String?, Throwable?) -> String,
|
messageFormatter: (l: LogLevel, m: String, t: String?, Throwable?) -> String,
|
||||||
@ -25,4 +25,4 @@ actual fun Logger(
|
|||||||
{ l, m, t, e -> "[$l] ${t ?: defaultTag} - $m" },
|
{ l, m, t, e -> "[$l] ${t ?: defaultTag} - $m" },
|
||||||
{ l, m, t, e -> filter(l, m, t ?: defaultTag, e) }
|
{ l, m, t, e -> filter(l, m, t ?: defaultTag, e) }
|
||||||
)
|
)
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package truth.simple.kmp.logger.common
|
package dev.inmo.kslog.common
|
||||||
|
|
||||||
import java.util.logging.Level
|
import java.util.logging.Level
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ actual fun Logger(
|
|||||||
e
|
e
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
1
src/main/AndroidManifest.xml
Normal file
1
src/main/AndroidManifest.xml
Normal file
@ -0,0 +1 @@
|
|||||||
|
<manifest package="dev.inmo.kslog"/>
|
@ -1,4 +1,4 @@
|
|||||||
package truth.simple.kmp.logger.common
|
package dev.inmo.kslog.common
|
||||||
|
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
|
|
||||||
@ -18,4 +18,4 @@ actual fun Logger(
|
|||||||
LogLevel.DEBUG -> Log.d(tag, m, e)
|
LogLevel.DEBUG -> Log.d(tag, m, e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user