diff -r 67743d62eda9 -r b3b2e88f441f ui/material2/build.gradle.kts --- a/ui/material2/build.gradle.kts Thu Apr 13 19:37:27 2023 -0400 +++ b/ui/material2/build.gradle.kts Thu Apr 13 20:56:48 2023 -0400 @@ -2,8 +2,12 @@ id("com.android.library") kotlin("android") id("com.geekorum.build.source-license-checker") + `maven-publish` } +group = "com.geekorum.aboutoss" +version = "0.0.1" + android { namespace = "com.geekorum.aboutoss.ui.material" compileSdk = 33 @@ -13,6 +17,10 @@ testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles("consumer-rules.pro") + + aarMetadata { + minCompileSdk = 24 + } } buildTypes { @@ -39,6 +47,13 @@ composeOptions { kotlinCompilerExtensionVersion = libs.versions.androidx.compose.compiler.get() } + + publishing { + singleVariant("release") { + withJavadocJar() + withSourcesJar() + } + } } dependencies { @@ -51,4 +66,29 @@ testImplementation(libs.junit) androidTestImplementation(libs.androidx.test.ext.junit) androidTestImplementation(libs.espresso.core) -} \ No newline at end of file +} + +publishing { + publications { + val pomConfiguration: (MavenPom).() -> Unit = { + name.set("ui-material") + description.set("A library to retrieve and display opensource licenses in Android applications") + licenses { + license { + name.set("GPL-3.0-or-later") + url.set("https://www.gnu.org/licenses/gpl-3.0.html") + distribution.set("repo") + } + } + inceptionYear.set("2023") + } + + register("release") { + afterEvaluate { + from(components["release"]) + } + artifactId = "ui-material" + pom(pomConfiguration) + } + } +}