--- a/ui/common/build.gradle.kts Thu Apr 13 19:37:27 2023 -0400
+++ b/ui/common/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.common"
compileSdk = 33
@@ -13,6 +17,11 @@
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
+
+ aarMetadata {
+ minCompileSdk = 24
+ }
+
}
buildTypes {
@@ -31,6 +40,13 @@
kotlinOptions {
jvmTarget = "1.8"
}
+
+ publishing {
+ singleVariant("release") {
+ withJavadocJar()
+ withSourcesJar()
+ }
+ }
}
dependencies {
@@ -43,8 +59,32 @@
exclude("com.google.dagger", "dagger-platform")
}
-
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-common")
+ 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<MavenPublication>("release") {
+ afterEvaluate {
+ from(components["release"])
+ }
+ artifactId = "ui-common"
+ pom(pomConfiguration)
+ }
+ }
+}