Skip to content

Commit

Permalink
Gradle 8.8 (#15)
Browse files Browse the repository at this point in the history
* upgrade to gradle 8.8

* migrate config for convention plugins to use gradle plugin accessors
  • Loading branch information
CharlieTap authored Jun 3, 2024
1 parent 1e30ce6 commit 4cb170e
Show file tree
Hide file tree
Showing 29 changed files with 249 additions and 220 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
* text eol=lf
*.bat text eol=crlf
*.jar binary
7 changes: 4 additions & 3 deletions ast/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.kotlin.atomic.fu)
id("kmp-conventions")
id("linting-conventions")
id("publishing-conventions")

alias(libs.plugins.conventions.kmp)
alias(libs.plugins.conventions.linting)
alias(libs.plugins.conventions.publishing)
}

kotlin {
Expand Down
5 changes: 3 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ plugins {
alias(libs.plugins.kotlin.multiplatform) apply false
alias(libs.plugins.kotlin.atomic.fu) apply false
alias(libs.plugins.dokka) apply false
id("maven-publish")
id("versions-conventions")

alias(libs.plugins.maven.publish)
alias(libs.plugins.conventions.versions)
}

tasks.register("clean",Delete::class){
Expand Down
9 changes: 5 additions & 4 deletions chasm/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ plugins {
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.kotlin.atomic.fu)
alias(libs.plugins.kotlinx.test.resources)
id("kmp-conventions")
id("linting-conventions")
id("publishing-conventions")
id("io.github.charlietap.sweet.plugin")
alias(libs.plugins.wasm.testsuite)

alias(libs.plugins.conventions.kmp)
alias(libs.plugins.conventions.linting)
alias(libs.plugins.conventions.publishing)
}

kotlin {
Expand Down
7 changes: 4 additions & 3 deletions decoder/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.kotlin.atomic.fu)
id("kmp-conventions")
id("linting-conventions")
id("publishing-conventions")

alias(libs.plugins.conventions.kmp)
alias(libs.plugins.conventions.linting)
alias(libs.plugins.conventions.publishing)
}

kotlin {
Expand Down
7 changes: 4 additions & 3 deletions decoder/wasm/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ plugins {
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.kotlin.atomic.fu)
alias(libs.plugins.kotlinx.test.resources)
id("kmp-conventions")
id("linting-conventions")
id("publishing-conventions")

alias(libs.plugins.conventions.kmp)
alias(libs.plugins.conventions.linting)
alias(libs.plugins.conventions.publishing)
}

kotlin {
Expand Down
7 changes: 4 additions & 3 deletions decoder/wat/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.kotlin.atomic.fu)
id("kmp-conventions")
id("linting-conventions")
id("publishing-conventions")

alias(libs.plugins.conventions.kmp)
alias(libs.plugins.conventions.linting)
alias(libs.plugins.conventions.publishing)
}

kotlin {
Expand Down
129 changes: 65 additions & 64 deletions example/android/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,64 +1,65 @@
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.hilt)
alias(libs.plugins.kotlin.symbol.processing)
id("linting-conventions")
}

android {

namespace = libs.versions.application.namespace.get()
compileSdk = libs.versions.compile.sdk.get().toInt()

defaultConfig {

applicationId = libs.versions.application.id.get()
minSdk = libs.versions.min.sdk.get().toInt()
targetSdk = libs.versions.target.sdk.get().toInt()
versionName = libs.versions.version.name.get()

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {

getByName("release") {
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

kotlinOptions {
jvmTarget = "11"
}

buildFeatures {
buildConfig = true
compose = true
}
}

composeCompiler {
enableStrongSkippingMode = true
}

dependencies {

implementation(libs.chasm.jvm)
implementation(libs.hilt.core)
implementation(libs.bundles.androidx)
implementation(libs.bundles.compose.ui)

runtimeOnly(libs.kotlinx.coroutines.android)

ksp(libs.bundles.hilt.compilers)
}
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.hilt)
alias(libs.plugins.kotlin.symbol.processing)

alias(libs.plugins.conventions.linting)
}

android {

namespace = libs.versions.application.namespace.get()
compileSdk = libs.versions.compile.sdk.get().toInt()

defaultConfig {

applicationId = libs.versions.application.id.get()
minSdk = libs.versions.min.sdk.get().toInt()
targetSdk = libs.versions.target.sdk.get().toInt()
versionName = libs.versions.version.name.get()

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {

getByName("release") {
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

kotlinOptions {
jvmTarget = "11"
}

buildFeatures {
buildConfig = true
compose = true
}
}

composeCompiler {
enableStrongSkippingMode = true
}

dependencies {

implementation(libs.chasm.jvm)
implementation(libs.hilt.core)
implementation(libs.bundles.androidx)
implementation(libs.bundles.compose.ui)

runtimeOnly(libs.kotlinx.coroutines.android)

ksp(libs.bundles.hilt.compilers)
}
3 changes: 2 additions & 1 deletion example/fibonacci-wasm/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
alias(libs.plugins.kotlin.multiplatform)
id("linting-conventions")

alias(libs.plugins.conventions.linting)
}

kotlin {
Expand Down
5 changes: 3 additions & 2 deletions executor/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.kotlin.atomic.fu)
id("kmp-conventions")
id("linting-conventions")

alias(libs.plugins.conventions.kmp)
alias(libs.plugins.conventions.linting)
}

kotlin {
Expand Down
7 changes: 4 additions & 3 deletions executor/gc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.kotlin.atomic.fu)
id("kmp-conventions")
id("linting-conventions")
id("publishing-conventions")

alias(libs.plugins.conventions.kmp)
alias(libs.plugins.conventions.linting)
alias(libs.plugins.conventions.publishing)
}

kotlin {
Expand Down
7 changes: 4 additions & 3 deletions executor/instantiator/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.kotlin.atomic.fu)
id("kmp-conventions")
id("linting-conventions")
id("publishing-conventions")

alias(libs.plugins.conventions.kmp)
alias(libs.plugins.conventions.linting)
alias(libs.plugins.conventions.publishing)
}

kotlin {
Expand Down
7 changes: 4 additions & 3 deletions executor/invoker/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.kotlin.atomic.fu)
id("kmp-conventions")
id("linting-conventions")
id("publishing-conventions")

alias(libs.plugins.conventions.kmp)
alias(libs.plugins.conventions.linting)
alias(libs.plugins.conventions.publishing)
}

kotlin {
Expand Down
7 changes: 4 additions & 3 deletions executor/memory/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.kotlin.atomic.fu)
id("kmp-conventions")
id("linting-conventions")
id("publishing-conventions")

alias(libs.plugins.conventions.kmp)
alias(libs.plugins.conventions.linting)
alias(libs.plugins.conventions.publishing)
}

kotlin {
Expand Down
7 changes: 4 additions & 3 deletions executor/numeric/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.kotlin.atomic.fu)
id("kmp-conventions")
id("linting-conventions")
id("publishing-conventions")

alias(libs.plugins.conventions.kmp)
alias(libs.plugins.conventions.linting)
alias(libs.plugins.conventions.publishing)
}

kotlin {
Expand Down
7 changes: 4 additions & 3 deletions executor/runtime-ext/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.kotlin.atomic.fu)
id("kmp-conventions")
id("linting-conventions")
id("publishing-conventions")

alias(libs.plugins.conventions.kmp)
alias(libs.plugins.conventions.linting)
alias(libs.plugins.conventions.publishing)
}

kotlin {
Expand Down
7 changes: 4 additions & 3 deletions executor/runtime/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.kotlin.atomic.fu)
id("kmp-conventions")
id("linting-conventions")
id("publishing-conventions")

alias(libs.plugins.conventions.kmp)
alias(libs.plugins.conventions.linting)
alias(libs.plugins.conventions.publishing)
}

kotlin {
Expand Down
7 changes: 4 additions & 3 deletions executor/type/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.kotlin.atomic.fu)
id("kmp-conventions")
id("linting-conventions")
id("publishing-conventions")

alias(libs.plugins.conventions.kmp)
alias(libs.plugins.conventions.linting)
alias(libs.plugins.conventions.publishing)
}

kotlin {
Expand Down
9 changes: 8 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,14 @@ kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", versi
kotlin-symbol-processing = { id = "com.google.devtools.ksp", version.ref = "ksp" }
kotlin-atomic-fu = { id = "org.jetbrains.kotlin.plugin.atomicfu", version.ref = "kotlin" }
kotlinx-test-resources = { id = "com.goncalossilva.resources", version.ref = "kotlinx-test-resources"}
kotlinter = { id = "org.jmailen.kotlinter", version.ref = "kotlinter" }
kotlinter = { id = "org.jmailen.kotlinter", version.ref = "kotlinter" }
maven-publish = { id = "maven-publish" }
wasm-testsuite = { id = "io.github.charlietap.sweet.plugin" }

conventions-kmp = { id = "kmp-conventions" }
conventions-linting = { id = "linting-conventions" }
conventions-publishing = { id = "publishing-conventions" }
conventions-versions = { id = "versions-conventions" }

[libraries]

Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,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
Loading

0 comments on commit 4cb170e

Please sign in to comment.