Skip to content

Commit

Permalink
Merge pull request #18 from respawn-app/1.4.2
Browse files Browse the repository at this point in the history
1.4.2
  • Loading branch information
Nek-12 authored Jul 25, 2024
2 parents 81c84d1 + 3f3c321 commit 7c3426d
Show file tree
Hide file tree
Showing 23 changed files with 111 additions and 277 deletions.
2 changes: 1 addition & 1 deletion .github/ci-gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 2 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,16 @@ jobs:
with:
distribution: 'zulu'
check-latest: true
java-version: 21
java-version: 22
cache: 'gradle'

- name: Validate gradle wrapper
uses: gradle/wrapper-validation-action@v3
uses: gradle/actions/wrapper-validation@v3

- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest

- name: Create local properties
env:
LOCAL_PROPERTIES: ${{ secrets.LOCAL_PROPERTIES }}
run: echo "$LOCAL_PROPERTIES" > local.properties

- name: Run detekt
run: ./gradlew detektAll

Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,11 @@ jobs:
with:
distribution: 'zulu'
check-latest: true
java-version: 21
java-version: 22
cache: 'gradle'

- name: Validate gradle wrapper
uses: gradle/wrapper-validation-action@v3

- name: Create local properties
env:
LOCAL_PROPERTIES: ${{ secrets.LOCAL_PROPERTIES }}
run: echo "$LOCAL_PROPERTIES" > local.properties
uses: gradle/actions/wrapper-validation@v3

- name: Update docs/README.md
run: cp ./README.md ./docs/README.md
Expand Down
24 changes: 9 additions & 15 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,30 +31,24 @@ jobs:
with:
distribution: 'zulu'
check-latest: true
java-version: 21
java-version: 22
cache: 'gradle'

- name: Validate gradle wrapper
uses: gradle/wrapper-validation-action@v3
uses: gradle/actions/wrapper-validation@v3

- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest

- name: Create local properties
env:
LOCAL_PROPERTIES: ${{ secrets.LOCAL_PROPERTIES }}
run: echo "$LOCAL_PROPERTIES" > local.properties

- name: Publish to sonatype
env:
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
# It's important to not upload in parallel or duplicate repos will be created
# repository creds are broken with gradle 8.6 https://github.com/gradle/gradle/issues/24040
run: ./gradlew publishAllPublicationsToSonatypeRepository -Dorg.gradle.parallel=false --stacktrace --no-configuration-cache
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
run: ./gradlew publishToMavenCentral --no-configuration-cache

- name: Generate Changelog
uses: mikepenz/release-changelog-builder-action@v4
Expand All @@ -68,7 +62,7 @@ jobs:
id: create_release
with:
draft: true
artifactErrorsFailBuild: false
artifactErrorsFailBuild: true
prerelease: false
body: ${{steps.build_changelog.outputs.changelog}}
tag: ${{ inputs.tag != '' && inputs.tag || github.ref_name }}
Expand Down
59 changes: 46 additions & 13 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import com.vanniktech.maven.publish.MavenPublishBaseExtension
import com.vanniktech.maven.publish.SonatypeHost
import nl.littlerobots.vcu.plugin.versionCatalogUpdate
import nl.littlerobots.vcu.plugin.versionSelector
import org.jetbrains.kotlin.compose.compiler.gradle.ComposeCompilerGradlePluginExtension
Expand All @@ -17,6 +19,7 @@ plugins {
alias(libs.plugins.compose.compiler) apply false
alias(libs.plugins.compose) apply false
alias(libs.plugins.serialization) apply false
alias(libs.plugins.maven.publish) apply false
// plugins already on a classpath (conventions)
// alias(libs.plugins.androidApplication) apply false
// alias(libs.plugins.androidLibrary) apply false
Expand All @@ -34,19 +37,6 @@ buildscript {
allprojects {
group = Config.artifactId
version = Config.versionName
plugins.withType<ComposeCompilerGradleSubplugin>().configureEach {
the<ComposeCompilerGradlePluginExtension>().apply {
enableIntrinsicRemember = true
enableNonSkippingGroupOptimization = true
enableStrongSkippingMode = true
stabilityConfigurationFile = rootProject.layout.projectDirectory.file("stability_definitions.txt")
if (properties["enableComposeCompilerReports"] == "true") {
val metricsDir = layout.buildDirectory.dir("compose_metrics")
metricsDestination = metricsDir
reportsDestination = metricsDir
}
}
}
tasks.withType<KotlinCompile>().configureEach {
compilerOptions {
jvmTarget.set(Config.jvmTarget)
Expand Down Expand Up @@ -85,6 +75,49 @@ subprojects {
archiveClassifier.set("javadoc")
}
}
plugins.withType<ComposeCompilerGradleSubplugin>().configureEach {
the<ComposeCompilerGradlePluginExtension>().apply {
enableIntrinsicRemember = true
enableNonSkippingGroupOptimization = true
enableStrongSkippingMode = true
stabilityConfigurationFile = rootProject.layout.projectDirectory.file("stability_definitions.txt")
if (properties["enableComposeCompilerReports"] == "true") {
val metricsDir = layout.buildDirectory.dir("compose_metrics")
metricsDestination = metricsDir
reportsDestination = metricsDir
}
}
}
extensions.findByType<MavenPublishBaseExtension>()?.apply {
val isReleaseBuild = properties["release"]?.toString().toBoolean()
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, false)
if (isReleaseBuild) signAllPublications()
coordinates(Config.artifactId, name, Config.version(isReleaseBuild))
pom {
name = Config.name
description = Config.description
url = Config.url
licenses {
license {
name = Config.licenseName
url = Config.licenseUrl
distribution = Config.licenseUrl
}
}
developers {
developer {
id = Config.vendorId
name = Config.vendorName
url = Config.developerUrl
email = Config.supportEmail
organizationUrl = Config.developerUrl
}
}
scm {
url = Config.scmUrl
}
}
}
}

doctor {
Expand Down
9 changes: 5 additions & 4 deletions buildSrc/src/main/kotlin/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"MemberVisibilityCanBePrivate",
"MissingPackageDeclaration",
"UndocumentedPublicClass",
"UndocumentedPublicProperty"
"UndocumentedPublicProperty",
"ConstPropertyName"
)

import org.gradle.api.JavaVersion
Expand All @@ -17,7 +18,7 @@ object Config {

const val majorRelease = 1
const val minorRelease = 4
const val patch = 1
const val patch = 2
const val postfix = ""
const val versionName = "$majorRelease.$minorRelease.$patch$postfix"

Expand All @@ -26,11 +27,11 @@ object Config {
const val vendorId = "respawn-app"
const val url = "https://github.com/respawn-app/kmputils"
const val developerUrl = "https://respawn.pro"
const val licenseFile = "LICENSE.txt"
const val licenseName = "The Apache Software License, Version 2.0"
const val licenseUrl = "https://www.apache.org/licenses/LICENSE-2.0.txt"
const val scmUrl = "https://github.com/respawn-app/KMPUtils.git"
const val description = """A collection of Kotlin Multiplatform essentials"""
const val name = "KMPUtils"
// kotlin

val optIns = listOf(
Expand All @@ -53,7 +54,7 @@ object Config {

val jvmTarget = JvmTarget.JVM_11
val javaVersion = JavaVersion.VERSION_11
const val compileSdk = 34
const val compileSdk = 35
const val targetSdk = compileSdk
const val minSdk = 21
const val appMinSdk = 26
Expand Down
73 changes: 0 additions & 73 deletions buildSrc/src/main/kotlin/ConfigurePublication.kt

This file was deleted.

91 changes: 0 additions & 91 deletions buildSrc/src/main/kotlin/PublishingExt.kt

This file was deleted.

Loading

0 comments on commit 7c3426d

Please sign in to comment.