-
Notifications
You must be signed in to change notification settings - Fork 8
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.8 and Anvil 2.4.4 support #568
base: main
Are you sure you want to change the base?
Changes from 2 commits
a420350
9caf86f
e3cdb12
5de5b2a
9c8bbea
09b903a
76e33a4
0b42890
dbd34f1
2b17da4
cf225ae
11dee52
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat | |
import org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED | ||
import org.gradle.api.tasks.testing.logging.TestLogEvent.PASSED | ||
import org.gradle.kotlin.dsl.withType | ||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_1_8 | ||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | ||
import java.io.File | ||
|
||
|
@@ -27,19 +28,22 @@ fun Project.common() { | |
tasks.withType<KotlinCompile>() | ||
.configureEach { | ||
|
||
kotlinOptions { | ||
allWarningsAsErrors = false | ||
|
||
jvmTarget = "1.8" | ||
|
||
freeCompilerArgs = freeCompilerArgs + listOf( | ||
"-Xjvm-default=all", | ||
"-Xallow-result-return-type", | ||
"-opt-in=kotlin.contracts.ExperimentalContracts", | ||
"-opt-in=kotlin.Experimental", | ||
"-opt-in=kotlin.time.ExperimentalTime", | ||
"-opt-in=kotlin.RequiresOptIn", | ||
"-Xinline-classes" | ||
compilerOptions { | ||
allWarningsAsErrors.set(false) | ||
|
||
jvmTarget.set(JVM_1_8) | ||
|
||
freeCompilerArgs.set( | ||
freeCompilerArgs.get() + listOf( | ||
"-Xjvm-default=all", | ||
"-Xallow-result-return-type", | ||
"-opt-in=kotlin.contracts.ExperimentalContracts", | ||
"-opt-in=kotlin.Experimental", | ||
"-opt-in=kotlin.time.ExperimentalTime", | ||
"-opt-in=kotlin.RequiresOptIn", | ||
"-opt-in=org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. After upgrading to Kotlin 1.8 I was getting a ton of |
||
"-Xinline-classes" | ||
) | ||
Comment on lines
-30
to
+46
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
) | ||
} | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,9 +18,8 @@ import com.vanniktech.maven.publish.AndroidSingleVariantLibrary | |
import com.vanniktech.maven.publish.JavadocJar.Dokka | ||
import com.vanniktech.maven.publish.KotlinJvm | ||
import com.vanniktech.maven.publish.MavenPublishBaseExtension | ||
import com.vanniktech.maven.publish.SonatypeHost.DEFAULT | ||
import com.vanniktech.maven.publish.SonatypeHost.Companion.DEFAULT | ||
import com.vanniktech.maven.publish.tasks.JavadocJar | ||
import com.vanniktech.maven.publish.tasks.SourcesJar | ||
import org.jetbrains.dokka.gradle.AbstractDokkaLeafTask | ||
import tangle.builds.GROUP | ||
import tangle.builds.SOURCE_WEBSITE | ||
|
@@ -126,9 +125,6 @@ tasks.withType(PublishToMavenRepository::class.java).configureEach { | |
tasks.withType(Jar::class.java).configureEach { | ||
notCompatibleWithConfigurationCache("") | ||
} | ||
tasks.withType(SourcesJar::class.java).configureEach { | ||
notCompatibleWithConfigurationCache("") | ||
} | ||
Comment on lines
-129
to
-131
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
tasks.withType(JavadocJar::class.java).configureEach { | ||
notCompatibleWithConfigurationCache("") | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[versions] | ||
androidTools = "7.2.2" | ||
androidTools = "7.3.1" | ||
benManes = "0.42.0" | ||
changeTracker = "0.7.3" | ||
coil = "2.2.0" | ||
|
@@ -14,7 +14,7 @@ groovy = "3.0.12" | |
hermit = "0.9.6" | ||
jUnit = "5.9.0" | ||
kotest = "5.4.2" | ||
kotlin = "1.7.0" | ||
kotlin = "1.8.10" | ||
ktlint-gradle = "11.0.0" | ||
|
||
sonarPlugin = "2.6.1" | ||
|
@@ -23,8 +23,10 @@ targetSdk = "30" | |
taskTree = "2.1.0" | ||
|
||
androidx-activity = "1.5.1" | ||
androidx-compose-runtime = "1.2.1" | ||
androidx-compose-compiler = "1.2.0" | ||
androidx-compose-foundation = "1.3.1" | ||
androidx-compose-material = "1.3.1" | ||
androidx-compose-runtime = "1.3.3" | ||
androidx-compose-compiler = "1.4.2" | ||
androidx-fragment-version = "1.5.2" | ||
androidx-hilt = "1.0.0" | ||
androidx-lifecycle = "2.5.1" | ||
|
@@ -45,18 +47,18 @@ kotlinx-coroutines = "1.6.4" | |
kotlinx-knit = "0.4.0" | ||
|
||
google-dagger = "2.43.2" | ||
google-ksp = "1.7.0-1.0.6" | ||
google-ksp = "1.8.10-1.0.9" | ||
google-material = "1.6.1" | ||
|
||
rickBusarow-dependencySync = "0.11.4" | ||
rickBusarow-moduleCheck = "0.12.3" | ||
|
||
square-anvil = "2.4.2" | ||
square-anvil = "2.4.4" | ||
square-moshi = "1.13.0" | ||
square-okhttp = "4.10.0" | ||
square-retrofit = "2.9.0" | ||
|
||
vanniktech-publish = "0.21.0" | ||
vanniktech-publish = "0.24.0" | ||
|
||
zacSweers-moshix = "0.18.3" | ||
|
||
|
@@ -94,11 +96,11 @@ androidx-arch-test-core = "androidx.arch.core:core-testing:2.1.0" | |
|
||
androidx-compose-compiler = { module = "androidx.compose.compiler:compiler", version.ref = "androidx-compose-compiler" } | ||
|
||
androidx-compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "androidx-compose-runtime" } | ||
androidx-compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "androidx-compose-foundation" } | ||
|
||
androidx-compose-material-core = { module = "androidx.compose.material:material", version.ref = "androidx-compose-runtime" } | ||
androidx-compose-material-icons-core = { module = "androidx.compose.material:material-icons-core", version.ref = "androidx-compose-runtime" } | ||
androidx-compose-material-icons-extended = { module = "androidx.compose.material:material-icons-extended", version.ref = "androidx-compose-runtime" } | ||
androidx-compose-material-core = { module = "androidx.compose.material:material", version.ref = "androidx-compose-material" } | ||
androidx-compose-material-icons-core = { module = "androidx.compose.material:material-icons-core", version.ref = "androidx-compose-material" } | ||
androidx-compose-material-icons-extended = { module = "androidx.compose.material:material-icons-extended", version.ref = "androidx-compose-material" } | ||
|
||
androidx-compose-runtime = { module = "androidx.compose.runtime:runtime", version.ref = "androidx-compose-runtime" } | ||
|
||
|
@@ -232,7 +234,7 @@ kotlin-gradle-pluginApi = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin- | |
kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin" } | ||
kotlin-stdlib-jdk8 = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin" } | ||
|
||
kotlin-compile-testing = "com.github.tschuchortdev:kotlin-compile-testing:1.4.9" | ||
kotlin-compile-testing = "dev.zacsweers.kctfork:core:0.2.1" | ||
Comment on lines
-235
to
+237
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
kotlinx-atomicfu = { module = "org.jetbrains.kotlinx:atomicfu-gradle-plugin", version.ref = "kotlinx-atomicfu" } | ||
kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinx-coroutines" } | ||
|
@@ -257,7 +259,7 @@ rickBusarow-dispatch-test-jUnit4 = { module = "com.rickbusarow.dispatch:dispatch | |
rickBusarow-dispatch-test-jUnit5 = { module = "com.rickbusarow.dispatch:dispatch-test-junit5", version.ref = "dispatch" } | ||
rickBusarow-dispatch-viewModel = { module = "com.rickbusarow.dispatch:dispatch-android-viewmodel", version.ref = "dispatch" } | ||
|
||
robolectric = "org.robolectric:robolectric:4.8.2" | ||
robolectric = "org.robolectric:robolectric:4.9.2" | ||
Comment on lines
-260
to
+262
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was needed after upgrading the target/compile SDK to 33. |
||
|
||
scabbard = "gradle.plugin.dev.arunkumar:scabbard-gradle-plugin:0.5.0" | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
#Sat Jan 29 19:04:46 CST 2022 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip | ||
distributionPath=wrapper/dists | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Version Catalogs were moved out of preview as part of Gradle 8.0