Skip to content

Commit

Permalink
fix release to sonatype central once again
Browse files Browse the repository at this point in the history
  • Loading branch information
hrach committed May 17, 2024
1 parent 7fbee93 commit 8dbbfc4
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 22 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,8 @@ jobs:
run: |
echo ${{ secrets.ENCRYPT_KEY }} | release/signing-unpack.sh
- name: Deploy to Sonatype
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
run: |
./gradlew publishAndReleaseToMavenCentral --no-configuration-cache
./gradlew :publishAggregatedPublicationToCentralPortal --no-configuration-cache
- name: Build AAB & APK
run: |
./gradlew :demo:bundleRelease :demo:assembleRelease
Expand Down
9 changes: 8 additions & 1 deletion bottomsheet/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ plugins {
id("com.android.library")
id("org.jetbrains.kotlin.android")
id("org.jetbrains.kotlinx.binary-compatibility-validator")
id("com.vanniktech.maven.publish.base")
id("com.vanniktech.maven.publish")
id("com.gradleup.nmcp")
id("org.jmailen.kotlinter")
}

version = property("VERSION_NAME") as String

android {
namespace = "dev.hrach.navigation.bottomsheet"

Expand Down Expand Up @@ -45,6 +48,10 @@ android {
}
}

nmcp {
publishAllPublications {}
}

kotlinter {
reporters = arrayOf("json")
}
Expand Down
29 changes: 16 additions & 13 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import com.vanniktech.maven.publish.AndroidSingleVariantLibrary
import com.vanniktech.maven.publish.MavenPublishBaseExtension
import com.vanniktech.maven.publish.SonatypeHost
import java.util.Properties
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
Expand All @@ -11,7 +8,8 @@ plugins {
id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.14.0" apply false
id("org.jmailen.kotlinter") version "4.3.0" apply false
id("com.android.application") version "8.3.0" apply false
id("com.vanniktech.maven.publish.base") version "0.27.0" apply false
id("com.vanniktech.maven.publish") version "0.27.0" apply false
id("com.gradleup.nmcp") version "0.0.7"
}

subprojects {
Expand All @@ -36,16 +34,21 @@ subprojects {
}
}
}
}

nmcp {
publishAggregation {
project(":bottomsheet")
project(":modalsheet")

plugins.withId("com.vanniktech.maven.publish.base") {
@Suppress("UnstableApiUsage")
configure<MavenPublishBaseExtension> {
group = requireNotNull(project.findProperty("GROUP"))
version = requireNotNull(project.findProperty("VERSION_NAME"))
pomFromGradleProperties()
publishToMavenCentral(SonatypeHost.S01, true)
signAllPublications()
configure(AndroidSingleVariantLibrary())
val signingPropsFile = rootProject.file("release/signing.properties")
val localProperties = Properties()
with(signingPropsFile.inputStream()) {
localProperties.load(this)
}

username = localProperties.getProperty("centralSonatypeUsername")
password = localProperties.getProperty("centralSonatypePassword")
publicationType = "AUTOMATIC"
}
}
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ POM_LICENCE_DIST=repo

POM_DEVELOPER_ID=hrach
POM_DEVELOPER_NAME=Jan Skrasek

RELEASE_SIGNING_ENABLED=true
9 changes: 8 additions & 1 deletion modalsheet/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ plugins {
id("com.android.library")
id("org.jetbrains.kotlin.android")
id("org.jetbrains.kotlinx.binary-compatibility-validator")
id("com.vanniktech.maven.publish.base")
id("com.vanniktech.maven.publish")
id("com.gradleup.nmcp")
id("org.jmailen.kotlinter")
}

version = property("VERSION_NAME") as String

android {
namespace = "dev.hrach.navigation.modalsheet"

Expand Down Expand Up @@ -45,6 +48,10 @@ android {
}
}

nmcp {
publishAllPublications {}
}

kotlinter {
reporters = arrayOf("json")
}
Expand Down
Binary file modified release/secring.gpg.aes
Binary file not shown.
4 changes: 1 addition & 3 deletions release/signing.properties.aes
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
Salted__a��$��7���+����T��o�/b
��[��y��W�?Uե���M��.�':)�"���D�RU�����3���Gm�7�1�L|�@F�/�L�� o�D�\�x뒬�DЗ=�u�<Q
�8�P�����Sn-������(H�2L�6�!a����l�ȫ�HiB^Uf�����7�ȭ���n�Zh��H�!�(LT��^�!�a;ӱ��"}5����u�Ĕ���6��2����x��A���e�U!
Salted__F���|���}��F�"y[��m�j {�d�K?0g�.`���M4.yB������N��Z��~j�*h�;,�C��'ˠ�.� pher��-j�z�X�P�8�#�Z�o��&椻�MdZ��k����"����.$>�����4!c�8��8�Ą���͢o籸�sI!��|�����;�����X���6sf7C(АrBO��7]@�0F t�e �-��bO��ĭUگ���{
Expand Down

0 comments on commit 8dbbfc4

Please sign in to comment.