Skip to content

Commit

Permalink
Merge pull request #389 from skydoves/migrate/nexus-plugin
Browse files Browse the repository at this point in the history
Migrate nexus plugin
  • Loading branch information
skydoves authored Dec 31, 2023
2 parents 6efd2ac + bd14f3d commit 17e3b90
Show file tree
Hide file tree
Showing 17 changed files with 174 additions and 225 deletions.
20 changes: 14 additions & 6 deletions bom/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,22 @@ import com.github.skydoves.landscapist.Configuration

plugins {
kotlin("jvm")
id(libs.plugins.nexus.plugin.get().pluginId)
}

rootProject.extra.apply {
set("PUBLISH_GROUP_ID", Configuration.artifactGroup)
set("PUBLISH_ARTIFACT_ID", "landscapist-bom")
set("PUBLISH_VERSION", rootProject.extra.get("rootVersionName"))
apply(from = "${rootDir}/scripts/publish-module.gradle.kts")

mavenPublishing {
val artifactId = "landscapist-bom"
coordinates(
Configuration.artifactGroup,
artifactId,
rootProject.extra.get("libVersion").toString()
)

pom {
name.set(artifactId)
}
}

dependencies {
Expand All @@ -40,5 +50,3 @@ dependencies {
}
}

apply(from ="${rootDir}/scripts/publish-module.gradle")

Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class AndroidLibraryComposeConventionPlugin : Plugin<Project> {
with(target) {
pluginManager.apply("com.android.library")
pluginManager.apply("org.jetbrains.kotlin.android")
pluginManager.apply("com.vanniktech.maven.publish")
pluginManager.apply("binary-compatibility-validator")
pluginManager.apply("org.jetbrains.dokka")
pluginManager.apply("androidx.baselineprofile")
Expand Down
2 changes: 0 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,3 @@ plugins {
alias(libs.plugins.nexus.plugin)
alias(libs.plugins.dokka)
}

apply(from = "${rootDir}/scripts/publish-root.gradle")
22 changes: 13 additions & 9 deletions coil/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,20 @@ plugins {
id("landscapist.spotless")
}

rootProject.extra.apply {
set("PUBLISH_GROUP_ID", Configuration.artifactGroup)
set("PUBLISH_ARTIFACT_ID", "landscapist-coil")
set("PUBLISH_VERSION", rootProject.extra.get("rootVersionName"))
}
apply(from = "${rootDir}/scripts/publish-module.gradle.kts")

apply(from = "${rootDir}/scripts/publish-module.gradle")
mavenPublishing {
val artifactId = "landscapist-coil"
coordinates(
Configuration.artifactGroup,
artifactId,
rootProject.extra.get("libVersion").toString()
)

pom {
name.set(artifactId)
}
}

android {
namespace = "com.skydoves.landscapist.coil"
Expand All @@ -36,9 +43,6 @@ android {
minSdk = Configuration.minSdk
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
publishing {
singleVariant("release")
}
}

baselineProfile {
Expand Down
22 changes: 13 additions & 9 deletions fresco-websupport/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,27 @@ plugins {
id("landscapist.spotless")
}

rootProject.extra.apply {
set("PUBLISH_GROUP_ID", Configuration.artifactGroup)
set("PUBLISH_ARTIFACT_ID", "landscapist-fresco-websupport")
set("PUBLISH_VERSION", rootProject.extra.get("rootVersionName"))
}
apply(from = "${rootDir}/scripts/publish-module.gradle.kts")

apply(from = "${rootDir}/scripts/publish-module.gradle")
mavenPublishing {
val artifactId = "landscapist-fresco-websupport"
coordinates(
Configuration.artifactGroup,
artifactId,
rootProject.extra.get("libVersion").toString()
)

pom {
name.set(artifactId)
}
}

android {
namespace = "com.skydoves.landscapist.fresco.websupport"
compileSdk = Configuration.compileSdk
defaultConfig {
minSdk = Configuration.minSdk
}
publishing {
singleVariant("release")
}
}

baselineProfile {
Expand Down
22 changes: 13 additions & 9 deletions fresco/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,20 @@ plugins {
id("landscapist.spotless")
}

rootProject.extra.apply {
set("PUBLISH_GROUP_ID", Configuration.artifactGroup)
set("PUBLISH_ARTIFACT_ID", "landscapist-fresco")
set("PUBLISH_VERSION", rootProject.extra.get("rootVersionName"))
}
apply(from = "${rootDir}/scripts/publish-module.gradle.kts")

apply(from = "${rootDir}/scripts/publish-module.gradle")
mavenPublishing {
val artifactId = "landscapist-fresco"
coordinates(
Configuration.artifactGroup,
artifactId,
rootProject.extra.get("libVersion").toString()
)

pom {
name.set(artifactId)
}
}

android {
namespace = "com.skydoves.landscapist.fresco"
Expand All @@ -36,9 +43,6 @@ android {
minSdk = Configuration.minSdk
testInstrumentationRunner = "com.skydoves.landscapist.fresco.FrescoTestRunner"
}
publishing {
singleVariant("release")
}
}

baselineProfile {
Expand Down
22 changes: 13 additions & 9 deletions glide/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,20 @@ plugins {
id("landscapist.spotless")
}

rootProject.extra.apply {
set("PUBLISH_GROUP_ID", Configuration.artifactGroup)
set("PUBLISH_ARTIFACT_ID", "landscapist-glide")
set("PUBLISH_VERSION", rootProject.extra.get("rootVersionName"))
}
apply(from = "${rootDir}/scripts/publish-module.gradle.kts")

apply(from = "${rootDir}/scripts/publish-module.gradle")
mavenPublishing {
val artifactId = "landscapist-glide"
coordinates(
Configuration.artifactGroup,
artifactId,
rootProject.extra.get("libVersion").toString()
)

pom {
name.set(artifactId)
}
}

android {
namespace = "com.skydoves.landscapist.glide"
Expand All @@ -36,9 +43,6 @@ android {
minSdk = Configuration.minSdk
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
publishing {
singleVariant("release")
}
}

baselineProfile {
Expand Down
28 changes: 27 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,32 @@ android.defaults.buildfeatures.shaders=false
# thereby reducing the size of the R class for that library
# https://developer.android.com/studio/releases/gradle-plugin#4.1-nontransitive-r-class
android.nonTransitiveRClass=true

# Eanble compose compiler options
enableComposeCompilerMetrics=true
enableComposeCompilerReports=true
enableComposeCompilerReports=true

# Required to publish to Nexus (see https://github.com/gradle/gradle/issues/11308)
systemProp.org.gradle.internal.publish.checksums.insecure=true

# Increase timeout when pushing to Sonatype (otherwise we get timeouts)
systemProp.org.gradle.internal.http.socketTimeout=120000

POM_URL=https://github.com/skydoves/landscapist/
POM_SCM_URL=https://github.com/skydoves/landscapist/
POM_SCM_CONNECTION=scm:git:git://github.com/skydoves/landscapist.git
POM_SCM_DEV_CONNECTION=scm:git:git://github.com/skydoves/landscapist.git
POM_DESCRIPTION=A pluggable, highly optimized Jetpack Compose image loading library that fetches and displays network images with Glide, Coil, and Fresco.

POM_LICENCE_NAME=The Apache Software License, Version 2.0
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
POM_LICENCE_DIST=repo

POM_DEVELOPER_ID=skydoves
POM_DEVELOPER_NAME=Jaewoong Eum
POM_DEVELOPER_URL=https://github.com/skydoves/
POM_DEVELOPER_EMAIL=[email protected]

SONATYPE_HOST=DEFAULT
RELEASE_SIGNING_ENABLED=true
SONATYPE_AUTOMATIC_RELEASE=true
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
kotlin = "1.9.21"
dokka = "1.9.10"
jvmTarget = "11"
nexusPlugin = "1.3.0"
nexusPlugin = "0.26.0"
kotlinxCoroutines = "1.7.3"
kotlinBinaryCompatibility = "0.13.2"
androidGradlePlugin = "8.2.0"
Expand Down Expand Up @@ -75,7 +75,7 @@ android-test = { id = "com.android.test", version.ref = "androidGradlePlugin" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" }
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
nexus-plugin = { id = "io.github.gradle-nexus.publish-plugin", version.ref = "nexusPlugin" }
nexus-plugin = { id = "com.vanniktech.maven.publish", version.ref = "nexusPlugin" }
kotlin-binary-compatibility = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "kotlinBinaryCompatibility" }
hilt = { id = "com.google.dagger.hilt.android", version.ref = "hilt" }
spotless = { id = "com.diffplug.spotless", version.ref = "spotless" }
Expand Down
23 changes: 13 additions & 10 deletions landscapist-animation/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,20 @@ plugins {
id("landscapist.spotless")
}

rootProject.extra.apply {
set("PUBLISH_GROUP_ID", Configuration.artifactGroup)
set("PUBLISH_ARTIFACT_ID", "landscapist-animation")
set("PUBLISH_VERSION", rootProject.extra.get("rootVersionName"))
}
apply(from = "${rootDir}/scripts/publish-module.gradle.kts")

mavenPublishing {
val artifactId = "landscapist-animation"
coordinates(
Configuration.artifactGroup,
artifactId,
rootProject.extra.get("libVersion").toString()
)

apply(from = "${rootDir}/scripts/publish-module.gradle")
pom {
name.set(artifactId)
}
}

android {
namespace = "com.skydoves.landscapist.animation"
Expand All @@ -36,10 +43,6 @@ android {
minSdk = Configuration.minSdk
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

publishing {
singleVariant("release")
}
}

baselineProfile {
Expand Down
23 changes: 13 additions & 10 deletions landscapist-palette/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,20 @@ plugins {
id("landscapist.spotless")
}

rootProject.extra.apply {
set("PUBLISH_GROUP_ID", Configuration.artifactGroup)
set("PUBLISH_ARTIFACT_ID", "landscapist-palette")
set("PUBLISH_VERSION", rootProject.extra.get("rootVersionName"))
}
apply(from = "${rootDir}/scripts/publish-module.gradle.kts")

mavenPublishing {
val artifactId = "landscapist-palette"
coordinates(
Configuration.artifactGroup,
artifactId,
rootProject.extra.get("libVersion").toString()
)

apply(from = "${rootDir}/scripts/publish-module.gradle")
pom {
name.set(artifactId)
}
}

android {
namespace = "com.skydoves.landscapist.palette"
Expand All @@ -36,10 +43,6 @@ android {
minSdk = Configuration.minSdk
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

publishing {
singleVariant("release")
}
}

baselineProfile {
Expand Down
23 changes: 13 additions & 10 deletions landscapist-placeholder/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,20 @@ plugins {
id("landscapist.spotless")
}

rootProject.extra.apply {
set("PUBLISH_GROUP_ID", Configuration.artifactGroup)
set("PUBLISH_ARTIFACT_ID", "landscapist-placeholder")
set("PUBLISH_VERSION", rootProject.extra.get("rootVersionName"))
}
apply(from = "${rootDir}/scripts/publish-module.gradle.kts")

mavenPublishing {
val artifactId = "landscapist-placeholder"
coordinates(
Configuration.artifactGroup,
artifactId,
rootProject.extra.get("libVersion").toString()
)

apply(from = "${rootDir}/scripts/publish-module.gradle")
pom {
name.set(artifactId)
}
}

android {
namespace = "com.skydoves.landscapist.placeholder"
Expand All @@ -36,10 +43,6 @@ android {
minSdk = Configuration.minSdk
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

publishing {
singleVariant("release")
}
}

baselineProfile {
Expand Down
22 changes: 13 additions & 9 deletions landscapist-transformation/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,20 @@ plugins {
id("landscapist.spotless")
}

rootProject.extra.apply {
set("PUBLISH_GROUP_ID", Configuration.artifactGroup)
set("PUBLISH_ARTIFACT_ID", "landscapist-transformation")
set("PUBLISH_VERSION", rootProject.extra.get("rootVersionName"))
}
apply(from = "${rootDir}/scripts/publish-module.gradle.kts")

apply(from = "${rootDir}/scripts/publish-module.gradle")
mavenPublishing {
val artifactId = "landscapist-transformation"
coordinates(
Configuration.artifactGroup,
artifactId,
rootProject.extra.get("libVersion").toString()
)

pom {
name.set(artifactId)
}
}

android {
namespace = "com.skydoves.landscapist.transformation"
Expand All @@ -47,9 +54,6 @@ android {
path = file("src/main/cpp/CMakeLists.txt")
}
}
publishing {
singleVariant("release")
}
}

baselineProfile {
Expand Down
Loading

0 comments on commit 17e3b90

Please sign in to comment.