diff --git a/android.gradle b/android.gradle index 3c34b32..86e2499 100644 --- a/android.gradle +++ b/android.gradle @@ -1,9 +1,9 @@ android { - compileSdkVersion 31 + compileSdkVersion 32 defaultConfig { minSdkVersion 19 - targetSdkVersion 31 + targetSdkVersion 32 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } } diff --git a/bom/build.gradle b/bom/build.gradle index 9eec136..a15cf83 100644 --- a/bom/build.gradle +++ b/bom/build.gradle @@ -14,11 +14,3 @@ dependencies { } } } - -publishing { - publications { - release(MavenPublication) { - from components.javaPlatform - } - } -} diff --git a/build.gradle b/build.gradle index 1ccca17..e73eb2f 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,6 @@ plugins { id 'com.android.library' version '7.2.0' apply false id 'org.jetbrains.kotlin.android' version '1.6.21' apply false id 'io.github.gradle-nexus.publish-plugin' version '1.1.0' - id 'xyz.tynn.android.maven' version '0.2.1' apply false id 'com.github.ben-manes.versions' version '0.42.0' } @@ -13,14 +12,14 @@ allprojects { } subprojects { - pluginManager.withPlugin('com.android.library') { - apply plugin: 'org.jetbrains.kotlin.android' + pluginManager.withPlugin('com.android.application') { apply from: "$rootDir/android.gradle" - apply from: "$rootDir/library.gradle" } - pluginManager.withPlugin('com.android.application') { + pluginManager.withPlugin('com.android.library') { + apply plugin: 'org.jetbrains.kotlin.android' apply from: "$rootDir/android.gradle" + apply from: "$rootDir/library.gradle" } pluginManager.withPlugin('maven-publish') { diff --git a/gradle.properties b/gradle.properties index 32a0c14..34549b2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,4 @@ +android.disableAutomaticComponentCreation=true android.useAndroidX=true kotlin.code.style=official org.gradle.jvmargs=-Xmx2048m diff --git a/library.gradle b/library.gradle index ff59e76..48716d6 100644 --- a/library.gradle +++ b/library.gradle @@ -1,7 +1,11 @@ android { - libraryVariants.all { - it.generateBuildConfigProvider.configure { - enabled = false + buildFeatures { + buildConfig false + } + + publishing { + singleVariant('release') { + withSourcesJar() } } } diff --git a/publishing.gradle b/publishing.gradle index 9d8a2ed..2fcdc18 100644 --- a/publishing.gradle +++ b/publishing.gradle @@ -1,8 +1,17 @@ if (project != rootProject) publishing { - apply plugin: 'xyz.tynn.android.maven' - apply plugin: 'xyz.tynn.android.sources' apply plugin: 'signing' + publishing { + publications { + release(MavenPublication) { + afterEvaluate { + from components.findByName('javaPlatform') + ?: components.findByName('release') + } + } + } + } + signing { final signingKey = System.env.SIGNING_KEY final signingPassword = System.env.SIGNING_PASSWORD