Skip to content

Commit

Permalink
2.0.0-beta02 (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nek-12 authored Jul 25, 2024
2 parents 1ca8909 + 36de615 commit a33f43e
Show file tree
Hide file tree
Showing 11 changed files with 61 additions and 56 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,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
uses: gradle/actions/wrapper-validation@v3

- uses: maxim-lobanov/setup-xcode@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
cache: 'gradle'

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

- name: Update docs/README.md
run: cp ./README.md ./docs/README.md
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
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:
Expand Down
49 changes: 42 additions & 7 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 @@ -14,6 +16,7 @@ plugins {
alias(libs.plugins.dokka)
alias(libs.plugins.atomicfu)
alias(libs.plugins.compose.compiler) 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 @@ -23,6 +26,16 @@ plugins {
allprojects {
group = Config.artifactId
version = Config.versionName
tasks.withType<KotlinCompile>().configureEach {
compilerOptions {
jvmTarget.set(Config.jvmTarget)
freeCompilerArgs.apply { addAll(Config.jvmCompilerArgs) }
optIn.addAll(Config.optIns.map { "-opt-in=$it" })
}
}
}

subprojects {
plugins.withType<ComposeCompilerGradleSubplugin>().configureEach {
the<ComposeCompilerGradlePluginExtension>().apply {
enableIntrinsicRemember = true
Expand All @@ -36,17 +49,39 @@ allprojects {
}
}
}
tasks.withType<KotlinCompile>().configureEach {
compilerOptions {
jvmTarget.set(Config.jvmTarget)
freeCompilerArgs.apply { addAll(Config.jvmCompilerArgs) }
optIn.addAll(Config.optIns.map { "-opt-in=$it" })
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
}
}
}
}

subprojects {
if (name == "app") return@subprojects

apply(plugin = rootProject.libs.plugins.dokka.id)

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ object Config {
const val majorRelease = 2
const val minorRelease = 0
const val patch = 0
const val postfix = "-beta01"
const val postfix = "-beta02"
const val versionName = "$majorRelease.$minorRelease.$patch$postfix"
const val url = "https://github.com/respawn-app/ApiResult"
const val licenseName = "The Apache Software License, Version 2.0"
Expand Down
34 changes: 0 additions & 34 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import Config.namespace
import com.vanniktech.maven.publish.SonatypeHost

plugins {
id("pro.respawn.shared-library")
alias(libs.plugins.maven.publish)
Expand All @@ -14,34 +11,3 @@ dependencies {
commonMainApi(libs.kotlin.coroutines.core)
jvmTestImplementation(libs.bundles.unittest)
}

mavenPublishing {
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
}
}
}
12 changes: 6 additions & 6 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
[versions]
compose = "1.6.10"
compose-activity = "1.9.0"
compose-material3 = "1.3.0-beta04"
compose-activity = "1.9.1"
compose-material3 = "1.3.0-beta05"
composeDetektPlugin = "1.3.0"
core-ktx = "1.13.1"
coroutines = "1.9.0-RC"
dependencyAnalysisPlugin = "1.32.0"
detekt = "1.23.6"
detektFormattingPlugin = "1.23.6"
dokka = "1.9.20"
gradleAndroid = "8.6.0-alpha08"
gradleAndroid = "8.6.0-beta02"
gradleDoctorPlugin = "0.10.0"
kotest = "5.9.1"
# @pin
kotlin = "2.0.0"
kotlinx-atomicfu = "0.23.1"
lifecycle = "2.8.2"
lifecycle = "2.8.4"
maven-publish-plugin = "0.29.0"
turbine = "1.0.0"
versionCatalogUpdatePlugin = "0.8.4"
maven-publish-plugin = "0.29.0"

[libraries]
android-gradle = { module = "com.android.tools.build:gradle", version.ref = "gradleAndroid" }
Expand Down Expand Up @@ -59,12 +59,12 @@ unittest = [
]

[plugins]
maven-publish = { id = "com.vanniktech.maven.publish", version.ref = "maven-publish-plugin" }
atomicfu = { id = "kotlinx-atomicfu", version.ref = "kotlinx-atomicfu" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
dependencyAnalysis = { id = "com.autonomousapps.dependency-analysis", version.ref = "dependencyAnalysisPlugin" }
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
gradleDoctor = { id = "com.osacky.doctor", version.ref = "gradleDoctorPlugin" }
kotest = { id = "io.kotest.multiplatform", version.ref = "kotest" }
maven-publish = { id = "com.vanniktech.maven.publish", version.ref = "maven-publish-plugin" }
version-catalog-update = { id = "nl.littlerobots.version-catalog-update", version.ref = "versionCatalogUpdatePlugin" }
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#Fri Jul 05 18:03:39 CEST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
7 changes: 5 additions & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
2 changes: 2 additions & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down

0 comments on commit a33f43e

Please sign in to comment.