diff --git a/.github/ci-gradle.properties b/.github/ci-gradle.properties index dce30b2..6489d6c 100644 --- a/.github/ci-gradle.properties +++ b/.github/ci-gradle.properties @@ -25,4 +25,4 @@ org.jetbrains.compose.experimental.macos.enabled=true org.gradle.configuration-cache.problems=warn nl.littlerobots.vcu.resolver=true org.gradle.console=plain -CI=true +release=true diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4c12057..0001ce2 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -48,7 +48,7 @@ jobs: ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }} ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }} ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }} - run: ./gradlew publishAndReleaseToMavenCentral --no-configuration-cache + run: ./gradlew publishToMavenCentral --no-configuration-cache - name: Generate Changelog uses: mikepenz/release-changelog-builder-action@v4 diff --git a/buildSrc/src/main/kotlin/Util.kt b/buildSrc/src/main/kotlin/Util.kt index e187c6d..9e93d23 100644 --- a/buildSrc/src/main/kotlin/Util.kt +++ b/buildSrc/src/main/kotlin/Util.kt @@ -5,10 +5,7 @@ import org.gradle.api.artifacts.VersionCatalog import org.gradle.api.artifacts.VersionCatalogsExtension import org.gradle.kotlin.dsl.getByType import org.gradle.plugin.use.PluginDependency -import java.io.File -import java.io.FileInputStream import java.util.Base64 -import java.util.Properties /** * Load version catalog for usage in places where it is not available yet with gradle 7.x. @@ -49,13 +46,6 @@ fun List.toJavaArrayString() = buildString { fun String.toBase64() = Base64.getEncoder().encodeToString(toByteArray()) -fun Project.localProperties() = Properties().apply { - val file = File(rootProject.rootDir.absolutePath, "local.properties") - if (file.exists()) { - load(FileInputStream(file)) - } -} - fun stabilityLevel(version: String): Int { Config.stabilityLevels.forEachIndexed { index, postfix -> val regex = """.*[.\-]$postfix[.\-\d]*""".toRegex(RegexOption.IGNORE_CASE) diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 315c34a..a558b3b 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -15,10 +15,9 @@ dependencies { } mavenPublishing { - val properties = localProperties() val isReleaseBuild = properties["release"]?.toString().toBoolean() publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, false) - signAllPublications() + if (isReleaseBuild) signAllPublications() coordinates(Config.group, Config.artifact, Config.version(isReleaseBuild)) pom { name = Config.name @@ -43,6 +42,5 @@ mavenPublishing { scm { url = Config.scmUrl } - } } diff --git a/gradle.properties b/gradle.properties index 5a85fc9..09a2657 100644 --- a/gradle.properties +++ b/gradle.properties @@ -22,3 +22,4 @@ android.nonFinalResIds=true kotlinx.atomicfu.enableJvmIrTransformation=true org.gradle.configuration-cache.problems=warn nl.littlerobots.vcu.resolver=true +release=false