Skip to content

Commit

Permalink
build: update to kotlin 1.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fbarthelery committed Jan 18, 2023
1 parent 052257a commit 41638b4
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 31 deletions.
13 changes: 1 addition & 12 deletions build.gradle.kts
Expand Up @@ -31,19 +31,10 @@ plugins {
// these should not be needed but for an unknown reason they get applied
// with bad ordering if not there. or they can't be applied dynamically
// version used is in gradle.properties
kotlin("jvm") apply false
alias(libs.plugins.firebase.crashlytics) apply false
alias(libs.plugins.google.gms.google.services) apply false
}

// Need to be there because if not, the various plugins downgrade the AGP version used from buildSrc
// during the compilation of the *.gradle.kts script
buildscript {
dependencies {
classpath("com.android.tools.build:gradle:7.3.1")
}
}

// some extra properties
extra["compileSdkInt"] = 33

Expand All @@ -65,9 +56,7 @@ allprojects {

tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = listOf(
"-Xjvm-default=all", "-opt-in=kotlin.RequiresOptIn")
freeCompilerArgs = listOf("-Xjvm-default=all")
}
}

Expand Down
2 changes: 1 addition & 1 deletion buildSrc/build.gradle.kts
Expand Up @@ -35,7 +35,7 @@ dependencies {
implementation("com.github.triplet.gradle:play-publisher:3.7.0")
implementation("com.geekorum.gradle.avdl:flydroid:0.0.3")
// need to be added to work with compose https://issuetracker.google.com/issues/195342732
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.0")

// fix https://github.com/google/dagger/issues/3068
implementation("com.squareup:javapoet:1.13.0")
Expand Down
7 changes: 1 addition & 6 deletions buildSrc/src/main/kotlin/AndroidJavaVersion.kt
Expand Up @@ -30,12 +30,7 @@ import org.gradle.kotlin.dsl.dependencies
* Configure java version compile options based on minSdkVersion value
*/
fun BaseExtension.configureJavaVersion() {
val api = defaultConfig.minSdkVersion?.apiLevel ?: 1
val version = when {
api >= 24 -> JavaVersion.VERSION_1_8
api >= 19 -> JavaVersion.VERSION_1_7
else -> JavaVersion.VERSION_1_6
}
val version = JavaVersion.VERSION_11
compileOptions {
sourceCompatibility = version
targetCompatibility = version
Expand Down
4 changes: 4 additions & 0 deletions faviKonSnoop/build.gradle.kts
Expand Up @@ -23,6 +23,10 @@ plugins {
alias(libs.plugins.kotlinx.serialization)
}

kotlin {
jvmToolchain(11)
}

dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation(enforcedPlatform(kotlin("bom")))
Expand Down
3 changes: 0 additions & 3 deletions gradle.properties
Expand Up @@ -17,9 +17,6 @@ android.useAndroidX=true
# disable it
kapt.include.compile.classpath=false

# plugin dependencies version
kotlinVersion=1.7.20

# specify path of geekdroid source to use them instead of the prebuilt library
# GEEKDROID_PROJECT_DIR=/home/darisk/devel/geekorum/geekdroid/

Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Expand Up @@ -29,7 +29,7 @@ androidx-fragment = "1.5.5"
androidx-constraintlayout = "2.1.4"
androidx-coordinatorlayout = "1.2.0"
androidx-compose-bom = "2023.01.00"
androidx-compose-compiler = "1.3.2"
androidx-compose-compiler = "1.4.0"
androidx-hilt-compiler = "1.0.0"
androidx-hilt-navigation-compose = "1.0.0"
androidx-hilt-work = "1.0.0"
Expand Down
4 changes: 4 additions & 0 deletions htmlparsers/build.gradle.kts
Expand Up @@ -22,6 +22,10 @@ plugins {
kotlin("jvm")
}

kotlin {
jvmToolchain(11)
}

dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation(enforcedPlatform(kotlin("bom")))
Expand Down
8 changes: 0 additions & 8 deletions settings.gradle.kts
Expand Up @@ -20,14 +20,6 @@
*/

pluginManagement {
val kotlinVersion: String by settings

plugins {
kotlin("android") version kotlinVersion
kotlin("jvm") version kotlinVersion
kotlin("kapt") version kotlinVersion
}

repositories {
gradlePluginPortal()
mavenCentral()
Expand Down
4 changes: 4 additions & 0 deletions webapi/build.gradle.kts
Expand Up @@ -24,6 +24,10 @@ plugins {
alias(libs.plugins.kotlinx.serialization)
}

kotlin {
jvmToolchain(11)
}

dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation(enforcedPlatform(kotlin("bom")))
Expand Down

0 comments on commit 41638b4

Please sign in to comment.