From 71d89b3f0d77b69f99e90b2e9f41464e78ba89a2 Mon Sep 17 00:00:00 2001 From: flosch Date: Sun, 9 Feb 2025 20:32:13 +0100 Subject: [PATCH 1/5] Refactor to plugin management and remove pitest --- .github/workflows/build.yml | 21 ++---- .github/workflows/deploy-release.yml | 2 +- .github/workflows/deploy-snapshot.yml | 2 +- .gitignore | 3 +- .idea/misc.xml | 3 +- .java-version | 1 + CHANGELOG.md | 6 ++ build.gradle.kts | 41 +++-------- control-core/build.gradle.kts | 85 ++++++++++------------- examples/android-counter/build.gradle.kts | 8 +-- gradle.properties | 19 ----- gradle/libs.versions.toml | 57 ++++++++------- gradle/wrapper/gradle-wrapper.properties | 2 +- settings.gradle.kts | 19 ++++- 14 files changed, 115 insertions(+), 154 deletions(-) create mode 100644 .java-version diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index df4cb359..1f6bc923 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,19 +55,6 @@ jobs: - name: "Check if coverage is satisfied" run: ./gradlew jacocoTestCoverageVerification - mutation_test: - runs-on: ubuntu-latest - steps: - - name: "Checkout" - uses: actions/checkout@v4 - - name: "Set up Java" - uses: actions/setup-java@v4 - with: - distribution: 'adopt' - java-version: '17' - - name: "Mutation Testing" - run: ./gradlew pitest - api_validation: runs-on: ubuntu-latest steps: @@ -82,7 +69,7 @@ jobs: run: ./gradlew apiCheck assemble: - needs: [lint, ktlint, test, check_coverage, mutation_test] + needs: [lint, ktlint, test, check_coverage] runs-on: ubuntu-latest steps: - name: "Checkout" @@ -109,8 +96,8 @@ jobs: - name: "Create coverage reports" run: ./gradlew check jacocoTestReport - name: "Upload coverage to codecov" - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v5.3.1 with: token: ${{ secrets.CODECOV_TOKEN }} - file: ./control-core/build/reports/jacoco/test/jacocoTestReport.xml - fail_ci_if_error: true \ No newline at end of file + files: ./control-core/build/reports/jacoco/test/jacocoTestReport.xml + fail_ci_if_error: true diff --git a/.github/workflows/deploy-release.yml b/.github/workflows/deploy-release.yml index c5a4f8ce..e236f944 100644 --- a/.github/workflows/deploy-release.yml +++ b/.github/workflows/deploy-release.yml @@ -17,7 +17,7 @@ jobs: distribution: 'adopt' java-version: '17' - name: "Checks all the things" - run: ./gradlew lint ktlintCheck test jacocoTestCoverageVerification pitest apiCheck assemble + run: ./gradlew lint ktlintCheck test jacocoTestCoverageVerification apiCheck assemble publish: needs: [ all_checks ] diff --git a/.github/workflows/deploy-snapshot.yml b/.github/workflows/deploy-snapshot.yml index 946114eb..9b2d7e29 100644 --- a/.github/workflows/deploy-snapshot.yml +++ b/.github/workflows/deploy-snapshot.yml @@ -17,7 +17,7 @@ jobs: distribution: 'adopt' java-version: '17' - name: "Checks all the things" - run: ./gradlew lint ktlintCheck test jacocoTestCoverageVerification pitest apiCheck assemble + run: ./gradlew lint ktlintCheck test jacocoTestCoverageVerification apiCheck assemble publish: needs: [ all_checks ] diff --git a/.gitignore b/.gitignore index 227a0538..ddc9a4e2 100644 --- a/.gitignore +++ b/.gitignore @@ -199,5 +199,4 @@ fabric.properties # End of https://www.toptal.com/developers/gitignore/api/android,androidstudio,macos -*.salive -.java-version \ No newline at end of file +*.salive \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index f5bf0fc8..61d47f58 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,3 +1,4 @@ + - + diff --git a/.java-version b/.java-version new file mode 100644 index 00000000..03b6389f --- /dev/null +++ b/.java-version @@ -0,0 +1 @@ +17.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ee9d9fc..96875dfe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # changelog +## `[1.4.0]` - 2025-XX-XX + +- Update Kotlin to `2.1.10` +- Update kotlinx.coroutines to `1.10.1` +- Publish `control-core` as kotlin multiplatform library + ## `[1.3.0]` - 2024-11-16 - Update Kotlin to `2.0.21` diff --git a/build.gradle.kts b/build.gradle.kts index 114bf33a..2d398722 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,35 +1,19 @@ -buildscript { - repositories { - google() - mavenCentral() - maven(url = "https://plugins.gradle.org/m2/") - } - - dependencies { - classpath(libs.kotlin.gradle.plugin) - classpath(libs.pitest.gradle.plugin) - classpath(libs.binary.compat.validator) - classpath(libs.maven.publish.plugin) - classpath(libs.dokka.gradle.plugin) - - // examples - classpath(libs.android.gradle.plugin) - classpath(libs.kotlin.serialization) - } -} - plugins { - jacoco alias(libs.plugins.ktlint) + alias(libs.plugins.dokka) + alias(libs.plugins.binary.compatibility.validator) + jacoco `maven-publish` signing + alias(libs.plugins.kotlin.multiplatform) apply false + alias(libs.plugins.android.application) apply false + alias(libs.plugins.android.library) apply false + alias(libs.plugins.vanniktech.maven.publish) apply false } // ---- api-validation --- // -apply(plugin = "binary-compatibility-validator") - -configure { +apiValidation { ignoredProjects.addAll( listOf( "kotlin-counter", @@ -47,7 +31,7 @@ subprojects { resolutionStrategy { eachDependency { if (requested.group == "org.jacoco") { - useVersion("0.8.7") + useVersion("0.8.12") } } } @@ -55,10 +39,3 @@ subprojects { } // ---- end jacoco --- // - -allprojects { - repositories { - google() - mavenCentral() - } -} diff --git a/control-core/build.gradle.kts b/control-core/build.gradle.kts index e3edf126..d29849ad 100644 --- a/control-core/build.gradle.kts +++ b/control-core/build.gradle.kts @@ -1,8 +1,9 @@ +import com.vanniktech.maven.publish.SonatypeHost + plugins { id("kotlin") - id("jacoco") - id("info.solidsoft.pitest") - id("com.vanniktech.maven.publish") + jacoco + alias(libs.plugins.vanniktech.maven.publish) } dependencies { @@ -17,22 +18,8 @@ dependencies { tasks.jacocoTestCoverageVerification { violationRules { - rule { limit { minimum = "0.95".toBigDecimal() } } + rule { limit { minimum = "0.9".toBigDecimal() } } } - classDirectories.setFrom( - sourceSets.main.get().output.asFileTree.matching { - // jacoco cannot handle inline functions properly - exclude( - "at/florianschuster/control/DefaultTagKt*", - "at/florianschuster/control/TakeUntilKt*", - ) - // builders - exclude( - "at/florianschuster/control/ControllerKt*", - "at/florianschuster/control/EffectControllerKt*", - ) - } - ) } tasks.jacocoTestReport { @@ -45,38 +32,40 @@ tasks.jacocoTestReport { // ---- end jacoco --- // -// ---- pitest --- // - -pitest { - targetClasses.add("at.florianschuster.control.*") - mutationThreshold.set(100) - excludedClasses.addAll( - // inline function - "at.florianschuster.control.DefaultTagKt**", - "at.florianschuster.control.TakeUntilKt**", - - // builder - "at.florianschuster.control.Controller**", - "at.florianschuster.control.EffectController**", - - // inlined invokeSuspend - "at.florianschuster.control.ControllerImplementation\$stateJob\$1", - "at.florianschuster.control.ControllerImplementation\$stateJob\$1\$2" - ) - threads.set(4) - jvmArgs.add("-ea") - avoidCallsTo.addAll( - "kotlin.jvm.internal", - "kotlin.ResultKt", - "kotlinx.coroutines" - ) - verbose.set(true) -} - -// ---- end pitest --- // - // ---- publishing --- // +group = "at.florianschuster.control" version = System.getenv("libraryVersionTag") +mavenPublishing { + publishToMavenCentral(SonatypeHost.S01) + signAllPublications() + coordinates(group.toString(), "control-core", version.toString()) + pom { + name = "control-core" + description = "coroutines flow based uni-directional architecture" + inceptionYear = "2019" + url = "https://github.com/floschu/control" + licenses { + license { + name = "The Apache Software License, Version 2.0" + url = "http://www.apache.org/licenses/LICENSE-2.0.txt" + distribution = "repo" + } + } + developers { + developer { + id = "floschu" + name = "Florian Schuster" + url = "https://github.com/floschu" + } + } + scm { + url = "https://github.com/floschu/control" + connection = "scm:git@github.com:floschu/control.git" + developerConnection = "scm:git@github.com:floschu/control.git" + } + } +} + // ---- end publishing --- // diff --git a/examples/android-counter/build.gradle.kts b/examples/android-counter/build.gradle.kts index 03affba7..131bdc51 100644 --- a/examples/android-counter/build.gradle.kts +++ b/examples/android-counter/build.gradle.kts @@ -1,16 +1,16 @@ plugins { - id("com.android.application") id("kotlin-android") + alias(libs.plugins.android.application) alias(libs.plugins.compose.compiler) } android { namespace = "at.florianschuster.control.counter" - compileSdk = 34 + compileSdk = libs.versions.android.compileSdk.get().toInt() defaultConfig { applicationId = "at.florianschuster.control.counter" - minSdk = 23 - targetSdk = 34 + minSdk = libs.versions.android.minSdk.get().toInt() + targetSdk = libs.versions.android.compileSdk.get().toInt() testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } compileOptions { diff --git a/gradle.properties b/gradle.properties index 827fdffb..2b43096e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,22 +5,3 @@ android.useAndroidX=true android.enableJetifier=true # Kotlin code style for this project: "official" or "obsolete": kotlin.code.style=official - -# maven -GROUP=at.florianschuster.control -POM_ARTIFACT_ID=control-core -POM_NAME=control-core -POM_DESCRIPTION=coroutines flow based uni-directional architecture -POM_INCEPTION_YEAR=2019 -POM_URL=https://github.com/floschu/control -POM_SCM_URL=https://github.com/floschu/control -POM_SCM_CONNECTION=scm:git@github.com:floschu/control.git -POM_SCM_DEV_CONNECTION=scm:git@github.com:floschu/control.git -POM_LICENCE_NAME=The Apache Software License, Version 2.0 -POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt -POM_LICENCE_DIST=repo -POM_DEVELOPER_ID=floschu -POM_DEVELOPER_NAME=Florian Schuster -POM_DEVELOPER_URL=https://github.com/floschu -SONATYPE_HOST=S01 -RELEASE_SIGNING_ENABLED=true diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 69cf5b29..17983a30 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,45 +1,48 @@ [versions] # lib -kotlin = "2.0.21" -coroutines = "1.9.0" +kotlin = "2.1.10" +coroutines = "1.10.1" +binary-compatibility-validator = "0.17.0" # examples -activity-compose = "1.9.3" -material3 = "1.3.1" -compose-bom = "2024.11.00" +agp = "8.8.0" +android-minSdk = "24" +android-compileSdk = "35" +androidx-activity-compose = "1.10.0" +androidx-compose-bom = "2025.01.01" +androidx-material3 = "1.3.1" espresso = "3.6.1" junit-ktx = "1.2.1" -mockk = "1.13.13" -pitest = "1.15.0" -binary-compat-validator = "0.14.0" -maven-publish-plugin = "0.25.3" -dokka = "1.9.20" -android-gradle-plugin = "8.6.1" +mockk = "1.13.16" +maven-publish-plugin = "0.29.0" +dokka = "2.0.0" ktlint = "12.1.1" -ui-test-junit4 = "1.7.5" +androidx-ui-test-junit4 = "1.7.7" [libraries] -activity-compose = { module = "androidx.activity:activity-compose", version.ref = "activity-compose" } -androidx-compose-bom = { module = "androidx.compose:compose-bom", version.ref = "compose-bom" } -androidx-compose-material = { module = "androidx.compose.material3:material3", version.ref = "material3" } +# lib +kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" } +kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" } +mockk = { module = "io.mockk:mockk", version.ref = "mockk" } + +# examples +activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activity-compose" } +androidx-compose-bom = { module = "androidx.compose:compose-bom", version.ref = "androidx-compose-bom" } +androidx-compose-material = { module = "androidx.compose.material3:material3", version.ref = "androidx-material3" } androidx-compose-material-icons-core = { module = "androidx.compose.material:material-icons-core" } androidx-compose-ui = { module = "androidx.compose.ui:ui" } androidx-compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling" } -androidx-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "ui-test-junit4" } +androidx-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "androidx-ui-test-junit4" } androidx-ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest" } espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espresso" } junit-ktx = { module = "androidx.test.ext:junit-ktx", version.ref = "junit-ktx" } -kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } -kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" } -kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" } -mockk = { module = "io.mockk:mockk", version.ref = "mockk" } -pitest-gradle-plugin = { module = "info.solidsoft.gradle.pitest:gradle-pitest-plugin", version.ref = "pitest" } -binary-compat-validator = { module = "org.jetbrains.kotlinx:binary-compatibility-validator", version.ref = "binary-compat-validator" } -maven-publish-plugin = { module = "com.vanniktech:gradle-maven-publish-plugin", version.ref = "maven-publish-plugin" } -dokka-gradle-plugin = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "dokka" } -android-gradle-plugin = { module = "com.android.tools.build:gradle", version.ref = "android-gradle-plugin" } -kotlin-serialization = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlin" } [plugins] +android-application = { id = "com.android.application", version.ref = "agp" } +android-library = { id = "com.android.library", version.ref = "agp" } +binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "binary-compatibility-validator" } +compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } +dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" } +kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlint" } -compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } \ No newline at end of file +vanniktech-maven-publish = { id = "com.vanniktech.maven.publish", version.ref = "maven-publish-plugin" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 4b7f81d5..d550a5f1 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip diff --git a/settings.gradle.kts b/settings.gradle.kts index 7d421412..1c3869f9 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,4 +1,21 @@ -include(":control-core") +pluginManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +dependencyResolutionManagement { + @Suppress("UnstableApiUsage") + repositories { + google() + mavenCentral() + } +} +rootProject.name = "control" + +include(":control-core") include(":examples:kotlin-counter") include(":examples:android-counter") From ebce9ba709ff334b761ee5adba6c31794d8aeb0f Mon Sep 17 00:00:00 2001 From: flosch Date: Sun, 16 Mar 2025 22:55:17 +0100 Subject: [PATCH 2/5] Refactor to multiplatform library --- .github/workflows/build.yml | 35 ++--- .github/workflows/deploy-release.yml | 10 +- .github/workflows/deploy-snapshot.yml | 8 +- .gitignore | 3 +- .idea/gradle.xml | 1 + .idea/misc.xml | 1 - CHANGELOG.md | 2 +- README.md | 20 ++- build.gradle.kts | 25 +--- control-core/api/control-core.api | 15 +++ control-core/api/control-core.klib.api | 121 ++++++++++++++++++ control-core/build.gradle.kts | 77 ++++++++--- .../at/florianschuster/control/Controller.kt | 2 +- .../control/EffectController.kt | 2 +- .../control/defaultControllerTag.kt | 3 + .../control/defaultDispatcher.kt | 0 .../at/florianschuster/control/errors.kt | 0 .../at/florianschuster/control/event.kt | 0 .../florianschuster/control/implementation.kt | 0 .../kotlin/at/florianschuster/control/log.kt | 4 +- .../at/florianschuster/control/start.kt | 6 +- .../kotlin/at/florianschuster/control/stub.kt | 11 +- .../at/florianschuster/control/takeUntil.kt | 2 +- .../control/CreateControllerTest.kt | 108 ++++++++++++++++ .../control/DefaultScopeDispatcherTest.kt | 4 +- .../at/florianschuster/control/EventTest.kt | 33 +++-- .../control/ImplementationTest.kt | 22 ++-- .../at/florianschuster/control/LogTest.kt | 56 ++++++++ .../florianschuster/control/NotImplemented.kt | 3 + .../at/florianschuster/control/StartTest.kt | 6 +- .../at/florianschuster/control/StubTest.kt | 10 +- .../florianschuster/control/TakeUntilTest.kt | 2 +- .../control/defaultControllerTag.jvm.kt} | 4 +- .../control/DefaultControllerTagTestJvm.kt | 37 ++++++ .../at/florianschuster/control/LogTestJvm.kt | 33 +++++ .../control/defaultControllerTag.native.kt | 3 + .../control/DefaultControllerTagTestNative.kt | 12 ++ .../control/CreateControllerTest.kt | 66 ---------- .../florianschuster/control/DefaultTagTest.kt | 37 ------ .../at/florianschuster/control/LogTest.kt | 83 ------------ .../control/counter/CounterScreenTest.kt | 4 +- .../ic_launcher.xml | 1 + .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 4151 -> 0 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 2515 -> 0 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 6126 -> 0 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 10006 -> 0 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 14616 -> 0 bytes .../control/counter/CounterController.kt | 5 +- .../control/counter/CounterControllerTest.kt | 4 +- gradle.properties | 4 +- gradle/libs.versions.toml | 20 ++- gradle/wrapper/gradle-wrapper.properties | 2 +- settings.gradle.kts | 1 + 53 files changed, 572 insertions(+), 336 deletions(-) create mode 100644 control-core/api/control-core.klib.api rename control-core/src/{main => commonMain}/kotlin/at/florianschuster/control/Controller.kt (99%) rename control-core/src/{main => commonMain}/kotlin/at/florianschuster/control/EffectController.kt (99%) create mode 100644 control-core/src/commonMain/kotlin/at/florianschuster/control/defaultControllerTag.kt rename control-core/src/{main => commonMain}/kotlin/at/florianschuster/control/defaultDispatcher.kt (100%) rename control-core/src/{main => commonMain}/kotlin/at/florianschuster/control/errors.kt (100%) rename control-core/src/{main => commonMain}/kotlin/at/florianschuster/control/event.kt (100%) rename control-core/src/{main => commonMain}/kotlin/at/florianschuster/control/implementation.kt (100%) rename control-core/src/{main => commonMain}/kotlin/at/florianschuster/control/log.kt (93%) rename control-core/src/{main => commonMain}/kotlin/at/florianschuster/control/start.kt (84%) rename control-core/src/{main => commonMain}/kotlin/at/florianschuster/control/stub.kt (86%) rename control-core/src/{main => commonMain}/kotlin/at/florianschuster/control/takeUntil.kt (95%) create mode 100644 control-core/src/commonTest/kotlin/at/florianschuster/control/CreateControllerTest.kt rename control-core/src/{test => commonTest}/kotlin/at/florianschuster/control/DefaultScopeDispatcherTest.kt (92%) rename control-core/src/{test => commonTest}/kotlin/at/florianschuster/control/EventTest.kt (85%) rename control-core/src/{test => commonTest}/kotlin/at/florianschuster/control/ImplementationTest.kt (96%) create mode 100644 control-core/src/commonTest/kotlin/at/florianschuster/control/LogTest.kt create mode 100644 control-core/src/commonTest/kotlin/at/florianschuster/control/NotImplemented.kt rename control-core/src/{test => commonTest}/kotlin/at/florianschuster/control/StartTest.kt (96%) rename control-core/src/{test => commonTest}/kotlin/at/florianschuster/control/StubTest.kt (94%) rename control-core/src/{test => commonTest}/kotlin/at/florianschuster/control/TakeUntilTest.kt (98%) rename control-core/src/{main/kotlin/at/florianschuster/control/defaultTag.kt => jvmMain/kotlin/at/florianschuster/control/defaultControllerTag.jvm.kt} (81%) create mode 100644 control-core/src/jvmTest/kotlin/at/florianschuster/control/DefaultControllerTagTestJvm.kt create mode 100644 control-core/src/jvmTest/kotlin/at/florianschuster/control/LogTestJvm.kt create mode 100644 control-core/src/nativeMain/kotlin/at/florianschuster/control/defaultControllerTag.native.kt create mode 100644 control-core/src/nativeTest/kotlin/at/florianschuster/control/DefaultControllerTagTestNative.kt delete mode 100644 control-core/src/test/kotlin/at/florianschuster/control/CreateControllerTest.kt delete mode 100644 control-core/src/test/kotlin/at/florianschuster/control/DefaultTagTest.kt delete mode 100644 control-core/src/test/kotlin/at/florianschuster/control/LogTest.kt rename examples/android-counter/src/main/res/{mipmap-anydpi-v26 => mipmap-anydpi}/ic_launcher.xml (79%) delete mode 100644 examples/android-counter/src/main/res/mipmap-hdpi/ic_launcher.png delete mode 100644 examples/android-counter/src/main/res/mipmap-mdpi/ic_launcher.png delete mode 100644 examples/android-counter/src/main/res/mipmap-xhdpi/ic_launcher.png delete mode 100644 examples/android-counter/src/main/res/mipmap-xxhdpi/ic_launcher.png delete mode 100644 examples/android-counter/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1f6bc923..b099541a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,7 @@ on: push jobs: lint: - runs-on: ubuntu-latest + runs-on: macos-latest steps: - name: "Checkout" uses: actions/checkout@v4 @@ -14,23 +14,10 @@ jobs: distribution: 'adopt' java-version: '17' - name: "lint" - run: ./gradlew lint - - ktlint: - runs-on: ubuntu-latest - steps: - - name: "Checkout" - uses: actions/checkout@v4 - - name: "Set up Java" - uses: actions/setup-java@v4 - with: - distribution: 'adopt' - java-version: '17' - - name: "ktlint" - run: ./gradlew ktlintCheck + run: ./gradlew lint ktlintCheck test: - runs-on: ubuntu-latest + runs-on: macos-latest steps: - name: "Checkout" uses: actions/checkout@v4 @@ -43,7 +30,7 @@ jobs: run: ./gradlew test check_coverage: - runs-on: ubuntu-latest + runs-on: macos-latest steps: - name: "Checkout" uses: actions/checkout@v4 @@ -53,10 +40,10 @@ jobs: distribution: 'adopt' java-version: '17' - name: "Check if coverage is satisfied" - run: ./gradlew jacocoTestCoverageVerification + run: ./gradlew koverVerify api_validation: - runs-on: ubuntu-latest + runs-on: macos-latest steps: - name: "Checkout" uses: actions/checkout@v4 @@ -69,8 +56,8 @@ jobs: run: ./gradlew apiCheck assemble: - needs: [lint, ktlint, test, check_coverage] - runs-on: ubuntu-latest + needs: [lint, test, check_coverage] + runs-on: macos-latest steps: - name: "Checkout" uses: actions/checkout@v4 @@ -84,7 +71,7 @@ jobs: upload_coverage: needs: [assemble] - runs-on: ubuntu-latest + runs-on: macos-latest steps: - name: "Checkout" uses: actions/checkout@v4 @@ -94,10 +81,10 @@ jobs: distribution: 'adopt' java-version: '17' - name: "Create coverage reports" - run: ./gradlew check jacocoTestReport + run: ./gradlew koverXmlReport - name: "Upload coverage to codecov" uses: codecov/codecov-action@v5.3.1 with: token: ${{ secrets.CODECOV_TOKEN }} - files: ./control-core/build/reports/jacoco/test/jacocoTestReport.xml + files: ./control-core/build/reports/kover/report.xml fail_ci_if_error: true diff --git a/.github/workflows/deploy-release.yml b/.github/workflows/deploy-release.yml index e236f944..b1eaa888 100644 --- a/.github/workflows/deploy-release.yml +++ b/.github/workflows/deploy-release.yml @@ -7,7 +7,7 @@ on: jobs: all_checks: - runs-on: ubuntu-latest + runs-on: macos-latest steps: - name: "Checkout" uses: actions/checkout@v4 @@ -17,11 +17,11 @@ jobs: distribution: 'adopt' java-version: '17' - name: "Checks all the things" - run: ./gradlew lint ktlintCheck test jacocoTestCoverageVerification apiCheck assemble + run: ./gradlew lint ktlintCheck test koverVerify apiCheck assemble publish: needs: [ all_checks ] - runs-on: ubuntu-latest + runs-on: macos-latest steps: - name: "Checkout" uses: actions/checkout@v4 @@ -34,7 +34,7 @@ jobs: uses: olegtarasov/get-tag@v2.1 id: tagName - name: "Upload release" - run: ./gradlew publishAllPublicationsToMavenCentralRepository --no-daemon --no-parallel + run: ./gradlew publishToMavenCentral --no-daemon --no-parallel env: libraryVersionTag: ${{ steps.tagName.outputs.tag }} ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }} @@ -42,7 +42,7 @@ jobs: ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_PRIVATE_KEY }} ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }} - name: "Publish release" - run: ./gradlew closeAndReleaseRepository --no-daemon --no-parallel + run: ./gradlew releaseRepository --no-daemon --no-parallel env: ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }} ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} diff --git a/.github/workflows/deploy-snapshot.yml b/.github/workflows/deploy-snapshot.yml index 9b2d7e29..c8703323 100644 --- a/.github/workflows/deploy-snapshot.yml +++ b/.github/workflows/deploy-snapshot.yml @@ -7,7 +7,7 @@ on: jobs: all_checks: - runs-on: ubuntu-latest + runs-on: macos-latest steps: - name: "Checkout" uses: actions/checkout@v4 @@ -17,11 +17,11 @@ jobs: distribution: 'adopt' java-version: '17' - name: "Checks all the things" - run: ./gradlew lint ktlintCheck test jacocoTestCoverageVerification apiCheck assemble + run: ./gradlew lint ktlintCheck test koverVerify apiCheck assemble publish: needs: [ all_checks ] - runs-on: ubuntu-latest + runs-on: macos-latest steps: - name: "Checkout" uses: actions/checkout@v4 @@ -34,7 +34,7 @@ jobs: uses: olegtarasov/get-tag@v2.1 id: tagName - name: "Upload release" - run: ./gradlew publishAllPublicationsToMavenCentralRepository --no-daemon --no-parallel + run: ./gradlew publishToMavenCentral --no-daemon --no-parallel env: libraryVersionTag: ${{ steps.tagName.outputs.tag }} ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }} diff --git a/.gitignore b/.gitignore index ddc9a4e2..806feb11 100644 --- a/.gitignore +++ b/.gitignore @@ -199,4 +199,5 @@ fabric.properties # End of https://www.toptal.com/developers/gitignore/api/android,androidstudio,macos -*.salive \ No newline at end of file +*.salive +.kotlin/ \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 56ca56c6..59bf2c4e 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -4,6 +4,7 @@