# HG changeset patch # User Da Risk # Date 1746542371 14400 # Node ID ed5dfac18c8497501f057231c2bbfd540099b48c # Parent 0c23a1d2e16a2f6f48044fcb655b4de0e413457b build: use convention plugins to simplify build scripts diff -r 0c23a1d2e16a -r ed5dfac18c84 core/build.gradle.kts --- a/core/build.gradle.kts Tue May 06 10:37:57 2025 -0400 +++ b/core/build.gradle.kts Tue May 06 10:39:31 2025 -0400 @@ -19,26 +19,16 @@ * You should have received a copy of the GNU General Public License * along with AboutOss. If not, see . */ -import org.jetbrains.kotlin.gradle.dsl.JvmTarget plugins { - id("com.android.library") - kotlin("multiplatform") - id("com.geekorum.build.source-license-checker") + id("com.geekorum.build.conventions.mpp-library-with-android") alias(libs.plugins.kotlinx.serialization) id("com.geekorum.build.maven-publish") id("com.geekorum.build.dokka") } -group = "com.geekorum.aboutoss" -version = "0.1.0" - kotlin { - androidTarget { - compilerOptions { - jvmTarget.set(JvmTarget.JVM_17) - } - } + androidTarget() jvm("desktop") @@ -64,16 +54,10 @@ android { namespace = "com.geekorum.aboutoss.core" - compileSdk = 35 defaultConfig { - minSdk = 24 - testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles("consumer-rules.pro") - aarMetadata { - minCompileSdk = 24 - } } buildTypes { @@ -85,10 +69,6 @@ ) } } - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } publishing { singleVariant("release") { diff -r 0c23a1d2e16a -r ed5dfac18c84 gradle.properties --- a/gradle.properties Tue May 06 10:37:57 2025 -0400 +++ b/gradle.properties Tue May 06 10:39:31 2025 -0400 @@ -20,4 +20,6 @@ #dokka v2 org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled -org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true \ No newline at end of file +org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true + +PROJECT_VERSION = 0.1.0 \ No newline at end of file diff -r 0c23a1d2e16a -r ed5dfac18c84 sample/build.gradle.kts --- a/sample/build.gradle.kts Tue May 06 10:37:57 2025 -0400 +++ b/sample/build.gradle.kts Tue May 06 10:39:31 2025 -0400 @@ -93,11 +93,11 @@ android { namespace = "com.geekorum.aboutoss.sampleapp" - compileSdk = 35 + compileSdk = 36 defaultConfig { applicationId = "com.geekorum.aboutoss.sampleapp" - minSdk = 24 + minSdk = 28 targetSdk = 33 versionCode = 1 versionName = "1.0" diff -r 0c23a1d2e16a -r ed5dfac18c84 ui/common/build.gradle.kts --- a/ui/common/build.gradle.kts Tue May 06 10:37:57 2025 -0400 +++ b/ui/common/build.gradle.kts Tue May 06 10:39:31 2025 -0400 @@ -19,27 +19,17 @@ * You should have received a copy of the GNU General Public License * along with AboutOss. If not, see . */ -import org.jetbrains.kotlin.gradle.dsl.JvmTarget plugins { - id("com.android.library") - kotlin("multiplatform") - id("com.geekorum.build.source-license-checker") + id("com.geekorum.build.conventions.mpp-library-with-android") alias(libs.plugins.jetbrains.compose.multiplatform) alias(libs.plugins.kotlin.compose) id("com.geekorum.build.maven-publish") id("com.geekorum.build.dokka") } -group = "com.geekorum.aboutoss" -version = "0.1.0" - kotlin { - androidTarget { - compilerOptions { - jvmTarget.set(JvmTarget.JVM_17) - } - } + androidTarget() jvm("desktop") @@ -76,18 +66,10 @@ android { namespace = "com.geekorum.aboutoss.ui.common" - compileSdk = 35 defaultConfig { - minSdk = 24 - testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles("consumer-rules.pro") - - aarMetadata { - minCompileSdk = 24 - } - } buildTypes { @@ -99,10 +81,6 @@ ) } } - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } publishing { singleVariant("release") { diff -r 0c23a1d2e16a -r ed5dfac18c84 ui/material2/build.gradle.kts --- a/ui/material2/build.gradle.kts Tue May 06 10:37:57 2025 -0400 +++ b/ui/material2/build.gradle.kts Tue May 06 10:39:31 2025 -0400 @@ -22,25 +22,16 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget plugins { - id("com.android.library") - kotlin("multiplatform") + id("com.geekorum.build.conventions.mpp-library-with-android") alias(libs.plugins.kotlin.compose) alias(libs.plugins.jetbrains.compose.multiplatform) alias(libs.plugins.kotlinx.serialization) - id("com.geekorum.build.source-license-checker") id("com.geekorum.build.maven-publish") id("com.geekorum.build.dokka") } -group = "com.geekorum.aboutoss" -version = "0.1.0" - kotlin { - androidTarget { - compilerOptions { - jvmTarget.set(JvmTarget.JVM_17) - } - } + androidTarget() jvm("desktop") @@ -77,17 +68,10 @@ android { namespace = "com.geekorum.aboutoss.ui.material" - compileSdk = 35 defaultConfig { - minSdk = 24 - testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles("consumer-rules.pro") - - aarMetadata { - minCompileSdk = 24 - } } buildTypes { @@ -99,10 +83,6 @@ ) } } - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } buildFeatures { compose = true diff -r 0c23a1d2e16a -r ed5dfac18c84 ui/material3/build.gradle.kts --- a/ui/material3/build.gradle.kts Tue May 06 10:37:57 2025 -0400 +++ b/ui/material3/build.gradle.kts Tue May 06 10:39:31 2025 -0400 @@ -19,28 +19,18 @@ * You should have received a copy of the GNU General Public License * along with AboutOss. If not, see . */ -import org.jetbrains.kotlin.gradle.dsl.JvmTarget plugins { - id("com.android.library") - kotlin("multiplatform") + id("com.geekorum.build.conventions.mpp-library-with-android") alias(libs.plugins.kotlin.compose) alias(libs.plugins.jetbrains.compose.multiplatform) alias(libs.plugins.kotlinx.serialization) - id("com.geekorum.build.source-license-checker") id("com.geekorum.build.maven-publish") id("com.geekorum.build.dokka") } -group = "com.geekorum.aboutoss" -version = "0.1.0" - kotlin { - androidTarget { - compilerOptions { - jvmTarget.set(JvmTarget.JVM_17) - } - } + androidTarget() jvm("desktop") @@ -80,17 +70,10 @@ android { namespace = "com.geekorum.aboutoss.ui.material3" - compileSdk = 35 defaultConfig { - minSdk = 24 - testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles("consumer-rules.pro") - - aarMetadata { - minCompileSdk = 24 - } } buildTypes { @@ -102,10 +85,6 @@ ) } } - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } buildFeatures { compose = true