65 Commits

Author SHA1 Message Date
renovate[bot]
b29c79ac7a Update kotlin to v2.2.10 2025-08-14 10:24:47 +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
375e3c1d6e Merge pull request #7 from InsanusMokrassar/renovate/test.ext.junit.version
Update dependency androidx.test.ext:junit to v1.2.1
2024-09-06 16:51:06 +06:00
renovate[bot]
d7b5ea6d83 Update dependency androidx.test.ext:junit to v1.2.1 2024-09-06 10:50:38 +00:00
4d8992e86f Merge pull request #6 from InsanusMokrassar/renovate/espresso.core
Update dependency androidx.test.espresso:espresso-core to v3.6.1
2024-09-06 16:50:14 +06:00
renovate[bot]
1b113fe006 Update dependency androidx.test.espresso:espresso-core to v3.6.1 2024-09-06 10:50:01 +00:00
3c8822e3e7 Merge pull request #4 from InsanusMokrassar/renovate/kotlin-monorepo
Update kotlin monorepo to v2.0.20
2024-09-06 16:42:12 +06:00
renovate[bot]
f7d115c624 Update kotlin monorepo to v2.0.20 2024-09-06 10:42:04 +00:00
bb798ccc67 Merge pull request #3 from InsanusMokrassar/renovate/kotlin.serialization
Update dependency org.jetbrains.kotlinx:kotlinx-serialization-json to v1.7.2
2024-09-06 16:40:50 +06:00
renovate[bot]
c4f147df83 Update dependency org.jetbrains.kotlinx:kotlinx-serialization-json to v1.7.2 2024-09-06 10:40:29 +00:00
c2fed22e80 Merge pull request #2 from InsanusMokrassar/renovate/configure
Configure Renovate
2024-09-06 16:39:55 +06:00
renovate[bot]
ec8915aed1 Add renovate.json 2024-09-06 10:37:23 +00:00
1d602c5d26 add .kotlin in .gitignore 2024-08-14 16:31:34 +06:00
2d36722c37 update template 2024-08-14 16:23:54 +06:00
37763d2221 Update libs.versions.toml 2024-04-02 22:10:50 +06:00
3ae29248af Update gradle-wrapper.properties 2024-04-02 22:09:19 +06:00
8f81904cdb update templates 2024-01-17 19:35:06 +06:00
33782f0cdb update dependencies 2024-01-17 19:15:48 +06:00
3bab6a95b2 Update libs.versions.toml 2023-11-29 02:55:39 +06:00
a757c4cf06 Update AndroidManifest.xml 2023-11-02 19:27:24 +06:00
453ae19a49 Update defaultAndroidSettings.gradle 2023-11-02 19:27:02 +06:00
631d74dc6b Update mppAndroidProject.gradle 2023-11-02 19:25:34 +06:00
bd455bebba Update mppProjectWithSerialization.gradle 2023-11-02 19:25:17 +06:00
bd07fb382e Update build.yml 2023-11-02 19:23:14 +06:00
297114273f Update settings.gradle 2023-11-02 19:22:12 +06:00
05f029c257 Update mppProjectWithSerialization.gradle 2023-11-02 19:21:20 +06:00
11ac3aebda Update mppAndroidProject.gradle 2023-11-02 19:20:55 +06:00
c5c7fd26e4 Update mppJavaProject.gradle 2023-11-02 19:20:45 +06:00
ce0aea6b77 Update defaultAndroidSettings.gradle 2023-11-02 19:19:33 +06:00
9d7955b9b0 Update libs.versions.toml 2023-11-02 19:19:01 +06:00
18b84216a5 Update gradle-wrapper.properties 2023-11-02 19:18:39 +06:00
1366dd55c2 Update libs.versions.toml 2023-10-31 17:33:03 +06:00
049dc8f5d7 Update libs.versions.toml 2023-10-16 13:13:56 +06:00
dac20a8a02 Update gradle-wrapper.properties 2023-10-16 13:13:13 +06:00
c1d6dae359 fix of build and templates 2023-08-24 14:22:43 +06:00
4ed6f8e104 Update mppProjectWithSerialization.gradle 2023-08-24 09:58:09 +06:00
dc07633928 Update mppAndroidProject.gradle 2023-08-24 09:57:37 +06:00
be7fa9241f Delete AndroidManifest.xml 2023-08-24 09:57:03 +06:00
df6c8b8358 Create AndroidManifest.xml 2023-08-24 09:56:44 +06:00
ca1ec3f208 Update libs.versions.toml 2023-08-24 09:50:34 +06:00
deba42332a Update libs.versions.toml 2023-05-20 22:18:47 +06:00
e0bce311d5 remove redundant template 2023-05-01 23:17:48 +06:00
ebc07f5c3d update dependencies and add ModuleGenerator templates 2023-05-01 23:13:49 +06:00
488e4b283d Update build.yml 2023-04-20 01:05:57 +06:00
c55087ce1b Update libs.versions.toml 2023-04-20 01:03:15 +06:00
45 changed files with 301 additions and 222 deletions

View File

@@ -5,15 +5,11 @@ on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 11
- name: Fix android 32.0.0 dx
continue-on-error: true
run: cd /usr/local/lib/android/sdk/build-tools/32.0.0/ && mv d8 dx && cd lib && mv d8.jar dx.jar
java-version: 17
- name: Build with Gradle
run: ./gradlew build

1
.gitignore vendored
View File

@@ -1,4 +1,5 @@
.idea
.kotlin
out/*
*.iml
target

4
.templates/README.md Normal file
View File

@@ -0,0 +1,4 @@
# Templates
This folder contains templates to generate your modules in Intellij Idea with plugin
[ModuleGenerator](https://plugins.jetbrains.com/plugin/21100-segment-generator)

View File

@@ -0,0 +1,5 @@
{
"module_name": "sample",
"module_package": "feature.{{.module_name}}",
"full_module_package": "project_group.project_name.{{.module_package}}"
}

View File

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

View File

@@ -0,0 +1 @@
package {{.full_module_package}}

View File

@@ -0,0 +1 @@
package {{.full_module_package}}

View File

@@ -0,0 +1,5 @@
{
"module_name": "sample",
"module_package": "feature.{{.module_name}}",
"full_module_package": "project_group.project_name.{{.module_package}}"
}

View File

@@ -0,0 +1,7 @@
plugins {
id "org.jetbrains.kotlin.multiplatform"
id "org.jetbrains.kotlin.plugin.serialization"
}
apply from: "$mppJavaProject"

View File

@@ -0,0 +1 @@
package {{.full_module_package}}

View File

@@ -0,0 +1 @@
package {{.full_module_package}}

View File

@@ -0,0 +1,5 @@
{
"module_name": "sample",
"module_package": "feature.{{.module_name}}",
"full_module_package": "project_group.project_name.{{.module_package}}"
}

View File

@@ -0,0 +1,7 @@
plugins {
id "org.jetbrains.kotlin.multiplatform"
id "org.jetbrains.kotlin.plugin.serialization"
}
apply from: "$mppJsProject"

View File

@@ -0,0 +1 @@
package {{.full_module_package}}

View File

@@ -0,0 +1 @@
package {{.full_module_package}}

View File

@@ -0,0 +1,5 @@
{
"module_name": "sample",
"module_package": "feature.{{.module_name}}",
"full_module_package": "project_group.project_name.{{.module_package}}"
}

View File

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

View File

@@ -0,0 +1 @@
package {{.full_module_package}}

View File

@@ -0,0 +1 @@
package {{.full_module_package}}

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,30 +1,33 @@
[versions]
kotlin = "1.8.10"
kotlin-serialization = "1.5.0"
kotlin = "2.2.10"
kotlin-serialization = "1.8.1"
kotlin-coroutines = "1.10.2"
dokka = "1.8.10"
dokka = "2.0.0"
dexcount = "3.1.0"
dexcount = "4.0.0"
junit_version = "4.12"
test_ext_junit_version = "1.1.3"
espresso_core = "3.4.0"
test_ext_junit_version = "1.2.1"
espresso_core = "3.6.1"
android-gradle-plugin = "7.3.1"
android-gradle-plugin = "8.7.2"
android-minSdk = "21"
android-compileSdk = "33"
android-buildTools = "33.0.1"
android-compileSdk = "35"
android-buildTools = "35.0.0"
[libraries]
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

@@ -6,9 +6,11 @@ android {
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 {
@@ -26,16 +28,7 @@ android {
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
sourceSets {
String sep = File.separator
main.java.srcDirs += "src${sep}main${sep}kotlin"
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}

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"

View File

@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

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

View File

@@ -1 +0,0 @@
<manifest package="project_group.project_name.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,39 +0,0 @@
project.version = "$version"
project.group = "$group"
// apply from: "$publishGradlePath"
kotlin {
jvm {
compilations.main {
kotlinOptions {
jvmTarget = "1.8"
}
}
}
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_1_8
targetCompatibility = JavaVersion.VERSION_1_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,61 +0,0 @@
project.version = "$version"
project.group = "$group"
// apply from: "$publishGradlePath"
kotlin {
jvm {
compilations.main {
kotlinOptions {
jvmTarget = "1.8"
}
}
}
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 {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
apply from: "$defaultAndroidSettingsPresetPath"

6
renovate.json Normal file
View File

@@ -0,0 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended"
]
}

View File

@@ -14,5 +14,3 @@ includes.each { originalName ->
project.name = projectName
project.projectDir = new File(projectDirectory)
}
enableFeaturePreview("VERSION_CATALOGS")

View File

@@ -1 +0,0 @@
package project_group.project_name.template

View File

@@ -1 +0,0 @@
<manifest package="project_group.project_name.template"/>