Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kotlin 1.9.10 + gradle 8.3 and a couple other things #146

Merged
merged 4 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '19'
java-version: '20'

- name: Build
uses: gradle/gradle-build-action@v2
Expand Down
8 changes: 5 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ import com.google.devtools.ksp.gradle.KspTask
import com.vanniktech.maven.publish.MavenPublishBaseExtension
import io.gitlab.arturbosch.detekt.Detekt
import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
alias(libs.plugins.kotlin.jvm) apply false
alias(libs.plugins.spotless) apply false
alias(libs.plugins.mavenPublish) apply false
alias(libs.plugins.dokka) apply false
Expand Down Expand Up @@ -109,15 +111,15 @@ allprojects {

subprojects {
pluginManager.withPlugin("java") {
configure<JavaPluginExtension> { toolchain { languageVersion.set(JavaLanguageVersion.of(19)) } }
configure<JavaPluginExtension> { toolchain { languageVersion.set(JavaLanguageVersion.of(20)) } }

tasks.withType<JavaCompile>().configureEach { options.release.set(11) }
}

pluginManager.withPlugin("org.jetbrains.kotlin.jvm") {
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = "11"
compilerOptions {
jvmTarget.set(JvmTarget.JVM_11)
// TODO re-enable once lint uses Kotlin 1.5
// allWarningsAsErrors = true
// freeCompilerArgs = freeCompilerArgs + listOf("-progressive")
Expand Down
2 changes: 1 addition & 1 deletion compose-lint-checks/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
kotlin("jvm")
alias(libs.plugins.kotlin.jvm)
// Run lint on the lints! https://groups.google.com/g/lint-dev/c/q_TVEe85dgc
alias(libs.plugins.lint)
alias(libs.plugins.ksp)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ constructor(
block.statements.filterIsInstance<KtCallExpression>().count {
it.emitsContent(contentEmitterOption.value)
}
}
?: 0
} ?: 0

internal fun KtFunction.indirectUiEmitterCount(mapping: Map<KtFunction, Int>): Int {
val bodyBlock = bodyBlockExpression ?: return 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ constructor(
block.statements.filterIsInstance<KtCallExpression>().count {
it.emitsContent(contentEmitterOption.value)
}
}
?: 0
} ?: 0

internal fun KtFunction.indirectUiEmitterCount(mapping: Map<KtFunction, Int>): Int {
val bodyBlock = bodyBlockExpression ?: return 0
Expand Down
13 changes: 7 additions & 6 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
[versions]
kotlin = "1.8.0"
ktfmt = "0.44"
kotlin = "1.9.10"
ktfmt = "0.46"
jvmTarget = "11"
lint = "31.1.1"
lint-latest = "31.2.0-alpha13"

[plugins]
detekt = { id = "io.gitlab.arturbosch.detekt", version = "1.23.1" }
dokka = { id = "org.jetbrains.dokka", version = "1.8.20" }
lint = { id = "com.android.lint", version = "8.1.1" }
ksp = { id = "com.google.devtools.ksp", version = "1.8.22-1.0.11" }
dokka = { id = "org.jetbrains.dokka", version = "1.9.0" }
lint = { id = "com.android.lint", version = "8.1.2" }
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
ksp = { id = "com.google.devtools.ksp", version = "1.9.10-1.0.13" }
mavenPublish = { id = "com.vanniktech.maven.publish", version = "0.25.3" }
spotless = { id = "com.diffplug.spotless", version = "6.20.0" }
spotless = { id = "com.diffplug.spotless", version = "6.21.0" }

[libraries]
autoService-annotations = "com.google.auto.service:auto-service-annotations:1.1.1"
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.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
3 changes: 2 additions & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# 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

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down