22 Commits

Author SHA1 Message Date
renovate[bot]
9e96fc0980 Update dependency gradle to v8.14.3 2025-07-04 19:59:12 +00:00
373906e156 rework templates 2025-04-30 14:39:12 +06:00
5fe23903a4 Merge pull request #23 from InsanusMokrassar/renovate/kotlin.serialization
Update dependency org.jetbrains.kotlinx:kotlinx-serialization-json to v1.8.1
2025-04-30 14:23:47 +06:00
renovate[bot]
ecf1238085 Update dependency org.jetbrains.kotlinx:kotlinx-serialization-json to v1.8.1 2025-04-30 08:23:38 +00:00
fdde796281 Merge pull request #22 from InsanusMokrassar/renovate/kotlin
Update kotlin to v2.1.20
2025-04-30 14:22:50 +06:00
renovate[bot]
4cc23d72bf Update kotlin to v2.1.20 2025-03-20 11:46:45 +00:00
b29e381ee3 Update libs.versions.toml 2025-02-16 10:48:32 +06:00
d388806d3b Update gradle-wrapper.properties 2025-01-29 11:00:16 +06:00
185285c1ca Merge pull request #19 from InsanusMokrassar/renovate/kotlin
Update kotlin to v2.1.10
2025-01-29 10:59:37 +06:00
renovate[bot]
23cc432d21 Update kotlin to v2.1.10 2025-01-29 04:59:25 +00:00
005491c256 Merge pull request #17 from InsanusMokrassar/renovate/kotlin.serialization
Update dependency org.jetbrains.kotlinx:kotlinx-serialization-json to v1.8.0
2025-01-29 10:58:58 +06:00
renovate[bot]
0ad128a11a Update dependency org.jetbrains.kotlinx:kotlinx-serialization-json to v1.8.0 2025-01-29 04:58:19 +00:00
ab7f703227 Merge pull request #16 from InsanusMokrassar/renovate/major-dokka
Update dependency org.jetbrains.dokka:dokka-gradle-plugin to v2
2024-12-27 10:04:13 +06:00
66b55947ae Merge pull request #15 from InsanusMokrassar/renovate/kotlin
Update kotlin to v2.1.0
2024-12-27 10:03:53 +06:00
renovate[bot]
b5230087da Update dependency org.jetbrains.dokka:dokka-gradle-plugin to v2 2024-12-16 15:36:43 +00:00
renovate[bot]
0b2be65b9e Update kotlin to v2.1.0 2024-11-27 16:36:51 +00:00
896028d0bb migrate onto new templates-oriented in gradle model 2024-11-11 16:49:11 +06:00
6dced2d86e Update gradle-wrapper.properties 2024-10-22 16:41:17 +06:00
29a4154490 Merge pull request #12 from InsanusMokrassar/renovate/kotlin
Update kotlin to v2.0.21
2024-10-22 16:40:39 +06:00
renovate[bot]
4f524ebf1b Update kotlin to v2.0.21 2024-10-10 10:42:30 +00:00
1d2cf6025d Merge pull request #10 from InsanusMokrassar/renovate/kotlin.serialization
Update dependency org.jetbrains.kotlinx:kotlinx-serialization-json to v1.7.3
2024-09-26 08:00:17 +06:00
renovate[bot]
00aab9e228 Update dependency org.jetbrains.kotlinx:kotlinx-serialization-json to v1.7.3 2024-09-19 17:02:44 +00:00
28 changed files with 239 additions and 220 deletions

View File

@@ -4,5 +4,5 @@ plugins {
id "com.android.library"
}
apply from: "$mppAndroidProjectPresetPath"
apply from: "$mppAndroidProject"

View File

@@ -3,5 +3,5 @@ plugins {
id "org.jetbrains.kotlin.plugin.serialization"
}
apply from: "$mppJavaProjectPresetPath"
apply from: "$mppJavaProject"

View File

@@ -3,5 +3,5 @@ plugins {
id "org.jetbrains.kotlin.plugin.serialization"
}
apply from: "$mppJsProjectPresetPath"
apply from: "$mppJsProject"

View File

@@ -4,5 +4,5 @@ plugins {
id "com.android.library"
}
apply from: "$mppProjectWithSerializationPresetPath"
apply from: "$mppProjectWithSerialization"

View File

@@ -1,25 +1,32 @@
allprojects {
ext {
projectByName = { String name ->
for (subproject in rootProject.subprojects) {
if (subproject.name == name) {
return subproject
}
}
return null
}
File templatesFolder = new File("$rootProject.projectDir.absolutePath${File.separatorChar}gradle${File.separatorChar}templates")
internalProject = { String name ->
projectByName(name)
}
Map properties = new HashMap<String, String>()
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"
if (templatesFolder.exists() && templatesFolder.isDirectory()) {
templatesFolder.listFiles().each {
properties[it.name - ".gradle"] = it.absolutePath
}
}
properties["projectByName"] = { name ->
for (subproject in rootProject.subprojects) {
if (subproject.name == name) {
return subproject
}
}
return null
}
properties["internalProject"] = { name ->
projectByName("$name")
}
allprojects {
ext {
releaseMode = (project.hasProperty('RELEASE_MODE') && project.property('RELEASE_MODE') == "true") || System.getenv('RELEASE_MODE') == "true"
properties.forEach { k, v ->
it[k] = v
}
}
}

View File

@@ -1,16 +1,17 @@
[versions]
kotlin = "2.0.20"
kotlin-serialization = "1.7.2"
kotlin = "2.1.20"
kotlin-serialization = "1.8.1"
kotlin-coroutines = "1.10.2"
dokka = "1.9.20"
dokka = "2.0.0"
dexcount = "4.0.0"
junit_version = "4.12"
test_ext_junit_version = "1.2.1"
espresso_core = "3.6.1"
android-gradle-plugin = "8.2.2"
android-gradle-plugin = "8.7.2"
android-minSdk = "21"
android-compileSdk = "35"
android-buildTools = "35.0.0"
@@ -19,12 +20,14 @@ android-buildTools = "35.0.0"
kotlin = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
kotlin-serialization = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlin-serialization" }
kotlin-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlin-coroutines" }
kotlin-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlin-coroutines" }
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-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" }
kotlin-test-js = { module = "org.jetbrains.kotlin:kotlin-test-js", version.ref = "kotlin" }
android-test-junit = { module = "androidx.test.ext:junit", version.ref = "test_ext_junit_version" }
android-test-espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espresso_core" }
android-test-espresso = { module = "androidx.test.espresso:espresso-core", version.ref = "espresso_core" }
# buildscript classpaths

View File

@@ -4,14 +4,13 @@ android {
compileSdkVersion libs.versions.android.compileSdk.get().toInteger()
buildToolsVersion libs.versions.android.buildTools.get()
namespace "${group}.${project.name}"
defaultConfig {
minSdkVersion libs.versions.android.minSdk.get().toInteger()
compileSdkVersion libs.versions.android.compileSdk.get().toInteger()
targetSdkVersion libs.versions.android.compileSdk.get().toInteger()
versionCode "${android_code_version}".toInteger()
versionName "$version"
namespace "${project.group}.${project.name}"
}
buildTypes {
release {
@@ -32,9 +31,4 @@ android {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
sourceSets {
String sep = File.separator
main.java.srcDirs += "src${sep}main${sep}kotlin"
}
}

View File

@@ -0,0 +1,24 @@
project.version = "$version"
project.group = "$group"
kotlin {
sourceSets {
commonMain {
dependencies {
implementation kotlin('stdlib')
}
}
commonTest {
dependencies {
implementation kotlin('test-common')
implementation kotlin('test-annotations-common')
implementation libs.kotlin.coroutines.test
}
}
}
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

View File

@@ -0,0 +1,25 @@
project.version = "$version"
project.group = "$group"
kotlin {
sourceSets {
commonMain {
dependencies {
implementation kotlin('stdlib')
api libs.kotlin.serialization
}
}
commonTest {
dependencies {
implementation kotlin('test-common')
implementation kotlin('test-annotations-common')
implementation libs.kotlin.coroutines.test
}
}
}
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

View File

@@ -0,0 +1,31 @@
kotlin {
androidTarget {
publishAllLibraryVariants()
compilations.all {
kotlinOptions {
jvmTarget = "17"
}
}
}
sourceSets {
androidUnitTest {
dependencies {
implementation kotlin('test-junit')
implementation libs.android.test.junit
implementation libs.android.test.espresso
}
}
androidInstrumentedTest {
dependencies {
implementation kotlin('test-junit')
implementation libs.android.test.junit
implementation libs.android.test.espresso
}
}
androidMain.dependsOn jvmMain
}
}
apply from: "$defaultAndroidSettings"

View File

@@ -0,0 +1,30 @@
kotlin {
js (IR) {
browser {
testTask {
useMocha {
timeout = "240000"
}
}
}
nodejs {
testTask {
useMocha {
timeout = "240000"
}
}
}
}
sourceSets {
jsMain {
dependencies {
}
}
jsTest {
dependencies {
implementation kotlin('test-js')
}
}
}
}

View File

@@ -0,0 +1,21 @@
kotlin {
jvm {
compilations.main {
kotlinOptions {
jvmTarget = "17"
}
}
}
sourceSets {
jvmMain {
dependencies {
}
}
jvmTest {
dependencies {
implementation kotlin('test-junit')
}
}
}
}

View File

@@ -0,0 +1,8 @@
kotlin {
linuxArm64()
sourceSets {
nativeMain.dependsOn commonMain
linuxArm64Main.dependsOn nativeMain
}
}

View File

@@ -0,0 +1,10 @@
kotlin {
linuxX64()
mingwX64()
sourceSets {
nativeMain.dependsOn commonMain
linuxX64Main.dependsOn nativeMain
mingwX64Main.dependsOn nativeMain
}
}

View File

@@ -0,0 +1,27 @@
kotlin {
wasmJs {
browser {
testTask {
useKarma {
useChromeHeadless()
useConfigDirectory(rootProject.relativeProjectPath("gradle/karma.config.d"))
}
}
}
nodejs {
testTask {
timeout = Duration.ofSeconds(240)
nodeJsArgs.add("--unhandled-rejections=warn")
nodeJsArgs.add("--trace-warnings")
}
}
}
sourceSets {
wasmJsTest {
dependencies {
implementation kotlin('test-wasm-js')
}
}
}
}

View File

@@ -0,0 +1,5 @@
apply from: "$defaultProject"
apply from: "$enableMPPJvm"
apply from: "$enableMPPJs"
apply from: "$enableMPPWasmJs"
apply from: "$enableMPPAndroid"

View File

@@ -0,0 +1,2 @@
apply from: "$defaultProject"
apply from: "$enableMPPJvm"

View File

@@ -0,0 +1,2 @@
apply from: "$defaultProject"
apply from: "$enableMPPJs"

View File

@@ -0,0 +1,5 @@
apply from: "$defaultProjectWithSerialization"
apply from: "$enableMPPJvm"
apply from: "$enableMPPJs"
apply from: "$enableMPPWasmJs"
apply from: "$enableMPPAndroid"

Binary file not shown.

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME

9
gradlew vendored
View File

@@ -86,8 +86,7 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@@ -115,7 +114,7 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
CLASSPATH="\\\"\\\""
# Determine the Java command to use to start the JVM.
@@ -206,7 +205,7 @@ fi
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
@@ -214,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"
# Stop when "xargs" is not available.

4
gradlew.bat vendored
View File

@@ -70,11 +70,11 @@ goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
set CLASSPATH=
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
:end
@rem End local scope for the variables with windows NT shell

View File

@@ -4,5 +4,5 @@ plugins {
id "com.android.library"
}
apply from: "$mppProjectWithSerializationPresetPath"
apply from: "$mppProjectWithSerialization"

View File

@@ -1,39 +0,0 @@
project.version = "$version"
project.group = "$group"
// apply from: "$publishGradlePath"
kotlin {
androidTarget {
publishAllLibraryVariants()
compilations.all {
kotlinOptions {
jvmTarget = "17"
}
}
}
sourceSets {
commonMain {
dependencies {
implementation libs.kotlin
api libs.kotlin.serialization
}
}
commonTest {
dependencies {
implementation libs.kotlin.test.common
implementation libs.kotlin.test.annotations.common
}
}
androidUnitTest {
dependencies {
implementation libs.kotlin.test.junit
implementation libs.android.test.junit
implementation libs.android.test.espresso.core
}
}
}
}
apply from: "$defaultAndroidSettingsPresetPath"

View File

@@ -1,39 +0,0 @@
project.version = "$version"
project.group = "$group"
// apply from: "$publishGradlePath"
kotlin {
jvm {
compilations.main {
kotlinOptions {
jvmTarget = "17"
}
}
}
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 {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

View File

@@ -1,31 +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
}
}
}
}

View File

@@ -1,65 +0,0 @@
project.version = "$version"
project.group = "$group"
// apply from: "$publishGradlePath"
kotlin {
jvm {
compilations.main {
kotlinOptions {
jvmTarget = "17"
}
}
}
js (IR) {
browser()
nodejs()
}
androidTarget {
publishAllLibraryVariants()
compilations.all {
kotlinOptions {
jvmTarget = "17"
}
}
}
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
}
}
androidUnitTest {
dependencies {
implementation libs.kotlin.test.junit
implementation libs.android.test.junit
implementation libs.android.test.espresso.core
}
}
}
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
apply from: "$defaultAndroidSettingsPresetPath"