perestroika

This commit is contained in:
InsanusMokrassar 2022-06-07 20:02:59 +06:00
parent 3d5896fc65
commit 199b7515e6
16 changed files with 76 additions and 225 deletions

View File

@ -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"

View File

@ -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"
}
}

View File

@ -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

View File

@ -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" }

View File

@ -1,8 +0,0 @@
plugins {
id "org.jetbrains.kotlin.multiplatform"
id "org.jetbrains.kotlin.plugin.serialization"
id "com.android.library"
}
apply from: "$mppProjectWithSerializationPresetPath"

View File

@ -1 +0,0 @@
<manifest package="dev.akkihi.lib"/>

View File

@ -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"

View File

@ -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)
}
}

View File

@ -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
}
}
}
}

View File

@ -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"

View File

@ -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")

View File

@ -1,4 +1,4 @@
package truth.simple.kmp.logger.common package dev.inmo.kslog.common
enum class LogLevel { enum class LogLevel {

View File

@ -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,

View File

@ -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

View File

@ -0,0 +1 @@
<manifest package="dev.inmo.kslog"/>

View File

@ -1,4 +1,4 @@
package truth.simple.kmp.logger.common package dev.inmo.kslog.common
import android.util.Log import android.util.Log