diff --git a/Shared/build.gradle.kts b/Shared/build.gradle.kts index 0e19777..4668d0e 100644 --- a/Shared/build.gradle.kts +++ b/Shared/build.gradle.kts @@ -1,7 +1,11 @@ +import com.vanniktech.maven.publish.AndroidSingleVariantLibrary +import com.vanniktech.maven.publish.SonatypeHost + plugins { alias(libs.plugins.android.library) alias(libs.plugins.jetbrains.kotlin.android) alias(libs.plugins.jetbrains.kotlin.serialization) + alias(libs.plugins.vanniktech.maven.publish) id("kotlin-parcelize") `maven-publish` } @@ -69,10 +73,49 @@ dependencies { api(libs.glassfish.jakarta.json) } +mavenPublishing { + configure(AndroidSingleVariantLibrary( + variant = "release", + sourcesJar = true, + publishJavadocJar = true, + )) + coordinates("com.pondersource.shared", "shared", "0.2.0") + + pom { + name.set("SolidAndroidShared") + description.set("A set of classes needed for SolidAndroidServices and it's dependencies.") + inceptionYear.set("2024") + url.set("https://github.com/pondersource/Android-Solid-Services/") + licenses { + license { + name.set("MIT License") + url.set("https://opensource.org/license/mit") + distribution.set("https://opensource.org/license/mit") + } + } + developers { + developer { + id.set("erfangholami") + name.set("Erfan Gholami") + url.set("https://github.com/erfangholami/") + } + } + scm { + url.set("https://github.com/pondersource/Android-Solid-Services/") + connection.set("scm:git:git://github.com/pondersource/Android-Solid-Services.git") + developerConnection.set("scm:git:ssh://git@github.com/pondersource/Android-Solid-Services.git") + } + } + + publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL) + signAllPublications() +} + +/* publishing { publications { register("release") { - groupId = "com.pondersource.solidandroidshared" + groupId = "com.pondersource.shared" artifactId = "shared" version = "0.2.0" @@ -81,4 +124,4 @@ publishing { } } } -} \ No newline at end of file +}*/ diff --git a/SolidAndroidApi/build.gradle.kts b/SolidAndroidApi/build.gradle.kts index 101dc33..ae2148d 100644 --- a/SolidAndroidApi/build.gradle.kts +++ b/SolidAndroidApi/build.gradle.kts @@ -1,8 +1,10 @@ -import org.gradle.kotlin.dsl.from +import com.vanniktech.maven.publish.AndroidSingleVariantLibrary +import com.vanniktech.maven.publish.SonatypeHost plugins { alias(libs.plugins.android.library) alias(libs.plugins.jetbrains.kotlin.android) + alias(libs.plugins.vanniktech.maven.publish) `maven-publish` } @@ -55,6 +57,45 @@ dependencies { api(project(":Shared")) } +mavenPublishing { + configure(AndroidSingleVariantLibrary( + variant = "release", + sourcesJar = true, + publishJavadocJar = true, + )) + coordinates("com.pondersource.solidandroidapi", "solidandroidapi", "0.2.0") + + pom { + name.set("SolidAndroidApi") + description.set("Connecting with Solid server in Android ecosystem for doing authentication, resource management and interacting with data modules.") + inceptionYear.set("2024") + url.set("https://github.com/pondersource/Android-Solid-Services/") + licenses { + license { + name.set("MIT License") + url.set("https://opensource.org/license/mit") + distribution.set("https://opensource.org/license/mit") + } + } + developers { + developer { + id.set("erfangholami") + name.set("Erfan Gholami") + url.set("https://github.com/erfangholami/") + } + } + scm { + url.set("https://github.com/pondersource/Android-Solid-Services/") + connection.set("scm:git:git://github.com/pondersource/Android-Solid-Services.git") + developerConnection.set("scm:git:ssh://git@github.com/pondersource/Android-Solid-Services.git") + } + } + + publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL) + signAllPublications() +} + +/* publishing { publications { register("release") { @@ -67,4 +108,4 @@ publishing { } } } -} \ No newline at end of file +}*/ diff --git a/SolidAndroidClient/build.gradle.kts b/SolidAndroidClient/build.gradle.kts index 7dd9e8b..f737f19 100644 --- a/SolidAndroidClient/build.gradle.kts +++ b/SolidAndroidClient/build.gradle.kts @@ -1,6 +1,10 @@ +import com.vanniktech.maven.publish.AndroidSingleVariantLibrary +import com.vanniktech.maven.publish.SonatypeHost + plugins { alias(libs.plugins.android.library) alias(libs.plugins.jetbrains.kotlin.android) + alias(libs.plugins.vanniktech.maven.publish) `maven-publish` } @@ -80,6 +84,45 @@ dependencies { api(project(":Shared")) } +mavenPublishing { + configure(AndroidSingleVariantLibrary( + variant = "release", + sourcesJar = true, + publishJavadocJar = true, + )) + coordinates("com.pondersource.solidandroidclient", "solidandroidclient", "0.2.0") + + pom { + name.set("SolidAndroidClien t") + description.set("An Android library to connect to Solid pods without authentication and based on connecting to Android Solid Services app as a single source of truth.") + inceptionYear.set("2024") + url.set("https://github.com/pondersource/Android-Solid-Services/") + licenses { + license { + name.set("MIT License") + url.set("https://opensource.org/license/mit") + distribution.set("https://opensource.org/license/mit") + } + } + developers { + developer { + id.set("erfangholami") + name.set("Erfan Gholami") + url.set("https://github.com/erfangholami/") + } + } + scm { + url.set("https://github.com/pondersource/Android-Solid-Services/") + connection.set("scm:git:git://github.com/pondersource/Android-Solid-Services.git") + developerConnection.set("scm:git:ssh://git@github.com/pondersource/Android-Solid-Services.git") + } + } + + publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL) + signAllPublications() +} + +/* publishing { publications { register("release") { @@ -92,4 +135,4 @@ publishing { } } } -} \ No newline at end of file +}*/ \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 0adea0f..7abf218 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -19,6 +19,7 @@ plugins { alias(libs.plugins.google.devtools.ksp) alias(libs.plugins.google.hilt.android) apply false alias(libs.plugins.google.protobuf) apply false + alias(libs.plugins.vanniktech.maven.publish) apply false } tasks.register("clean", Delete::class){ diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 178cd71..852c048 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,6 +35,7 @@ googleMaterial = "1.12.0" titaniumJsonLdJre8 = "1.4.1" jakartaJson = "2.0.1" lifecycleRuntime = "2.8.7" +vanniktechMavenPublish = "0.30.0" [libraries] jetbrains-kotlin-stdlib = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib", version.ref = "kotlin"} @@ -140,4 +141,6 @@ androidx-navigation-safeargs-kotlin = { id = "androidx.navigation.safeargs.kotli google-protobuf = { id = "com.google.protobuf", version.ref = "googleProtobuf"} +vanniktech-maven-publish = { id = "com.vanniktech.maven.publish", version.ref = "vanniktechMavenPublish"} + [bundles] \ No newline at end of file