Skip to content

Commit

Permalink
Use Compose compiler to fix kotlin 2.0 issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mlykotom committed Jun 14, 2024
1 parent aa0ac8e commit 1279238
Show file tree
Hide file tree
Showing 38 changed files with 39 additions and 53 deletions.
5 changes: 1 addition & 4 deletions AccessibilityCodelab/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'org.jetbrains.kotlin.plugin.compose'
}

android {
Expand Down Expand Up @@ -79,10 +80,6 @@ android {
compose true
}

composeOptions {
kotlinCompilerExtensionVersion '1.5.14'
}

packagingOptions {
excludes += "/META-INF/AL2.0"
excludes += "/META-INF/LGPL2.1"
Expand Down
1 change: 1 addition & 0 deletions AccessibilityCodelab/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ buildscript {

plugins {
id 'com.diffplug.spotless' version '6.25.0'
id 'org.jetbrains.kotlin.plugin.compose' version "2.0.0" apply false
}

subprojects {
Expand Down
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.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
4 changes: 1 addition & 3 deletions AdaptiveUiCodelab/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'org.jetbrains.kotlin.plugin.compose'
}

android {
Expand Down Expand Up @@ -52,9 +53,6 @@ android {
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion '1.5.14'
}
packagingOptions {
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
Expand Down
1 change: 1 addition & 0 deletions AdaptiveUiCodelab/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ buildscript {
dependencies {
classpath "com.android.tools.build:gradle:8.4.0"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.0"
classpath "org.jetbrains.kotlin:compose-compiler-gradle-plugin:2.0.0"
}
}

Expand Down
2 changes: 1 addition & 1 deletion AdaptiveUiCodelab/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.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
5 changes: 1 addition & 4 deletions AdvancedStateAndSideEffectsCodelab/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ plugins {
id 'kotlin-android'
id 'kotlin-kapt'
id 'dagger.hilt.android.plugin'
id 'org.jetbrains.kotlin.plugin.compose'
}

// Reads the Google maps key that is used in the AndroidManifest
Expand Down Expand Up @@ -83,10 +84,6 @@ android {
shaders false
}

composeOptions {
kotlinCompilerExtensionVersion '1.5.14'
}

packagingOptions {
// Multiple dependency bring these files in. Exclude them to enable
// our test APK to build (has no effect on our AARs)
Expand Down
1 change: 1 addition & 0 deletions AdvancedStateAndSideEffectsCodelab/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ buildscript {
classpath "com.android.tools.build:gradle:8.4.0"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.0"
classpath "com.google.dagger:hilt-android-gradle-plugin:2.51.1"
classpath "org.jetbrains.kotlin:compose-compiler-gradle-plugin:2.0.0"
}
}

Expand Down
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.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
1 change: 1 addition & 0 deletions AnimationCodelab/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:8.4.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.0"
classpath "org.jetbrains.kotlin:compose-compiler-gradle-plugin:2.0.0"
}
}

Expand Down
4 changes: 1 addition & 3 deletions AnimationCodelab/finished/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'org.jetbrains.kotlin.plugin.compose'
}

android {
Expand All @@ -39,9 +40,6 @@ android {
kotlinOptions {
jvmTarget = '1.8'
}
composeOptions {
kotlinCompilerExtensionVersion '1.5.14'
}
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion AnimationCodelab/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.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
4 changes: 1 addition & 3 deletions AnimationCodelab/start/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'org.jetbrains.kotlin.plugin.compose'
}

android {
Expand All @@ -39,9 +40,6 @@ android {
kotlinOptions {
jvmTarget = '1.8'
}
composeOptions {
kotlinCompilerExtensionVersion '1.5.14'
}
}

dependencies {
Expand Down
4 changes: 1 addition & 3 deletions BasicLayoutsCodelab/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'org.jetbrains.kotlin.plugin.compose'
}

android {
Expand Down Expand Up @@ -52,9 +53,6 @@ android {
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion '1.5.14'
}
packagingOptions {
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
Expand Down
1 change: 1 addition & 0 deletions BasicLayoutsCodelab/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ buildscript {
dependencies {
classpath "com.android.tools.build:gradle:8.4.0"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.0"
classpath "org.jetbrains.kotlin:compose-compiler-gradle-plugin:2.0.0"
}
}

Expand Down
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.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
4 changes: 1 addition & 3 deletions BasicStateCodelab/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("org.jetbrains.kotlin.plugin.compose")
}

android {
Expand Down Expand Up @@ -55,9 +56,6 @@ android {
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.5.14"
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
Expand Down
1 change: 1 addition & 0 deletions BasicStateCodelab/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:8.4.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.0"
classpath "org.jetbrains.kotlin:compose-compiler-gradle-plugin:2.0.0"
}
}

Expand Down
2 changes: 1 addition & 1 deletion BasicStateCodelab/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.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
4 changes: 1 addition & 3 deletions BasicsCodelab/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("org.jetbrains.kotlin.plugin.compose")
}

android {
Expand Down Expand Up @@ -55,9 +56,6 @@ android {
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.5.14"
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
Expand Down
1 change: 1 addition & 0 deletions BasicsCodelab/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@
plugins {
id("com.android.application") version "8.4.0" apply false
id("org.jetbrains.kotlin.android") version "2.0.0" apply false
id("org.jetbrains.kotlin.plugin.compose") version "2.0.0" apply false
}
2 changes: 1 addition & 1 deletion BasicsCodelab/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.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
5 changes: 2 additions & 3 deletions MigrationCodelab/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'androidx.navigation.safeargs.kotlin'
apply plugin: 'org.jetbrains.kotlin.plugin.compose'


android {
compileSdkVersion 34
Expand Down Expand Up @@ -49,9 +51,6 @@ android {
dataBinding true
compose true
}
composeOptions {
kotlinCompilerExtensionVersion '1.5.14'
}
packagingOptions {
// Multiple dependency bring these files in. Exclude them to enable
// our test APK to build (has no effect on our AARs)
Expand Down
1 change: 1 addition & 0 deletions MigrationCodelab/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ buildscript {
classpath "com.android.tools.build:gradle:8.4.0"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.0"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.7.7"
classpath "org.jetbrains.kotlin:compose-compiler-gradle-plugin:2.0.0"
}
}

Expand Down
2 changes: 1 addition & 1 deletion MigrationCodelab/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.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
1 change: 1 addition & 0 deletions NavigationCodelab/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'org.jetbrains.kotlin.plugin.compose'
}

android {
Expand Down
1 change: 1 addition & 0 deletions NavigationCodelab/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ buildscript {
dependencies {
classpath "com.android.tools.build:gradle:8.4.0"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.0"
classpath "org.jetbrains.kotlin:compose-compiler-gradle-plugin:2.0.0"
}
}

Expand Down
2 changes: 1 addition & 1 deletion NavigationCodelab/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.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue May 16 11:33:31 AEST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
5 changes: 1 addition & 4 deletions TestingCodelab/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'org.jetbrains.kotlin.plugin.compose'
}

android {
Expand Down Expand Up @@ -75,10 +76,6 @@ android {
shaders false
}

composeOptions {
kotlinCompilerExtensionVersion '1.5.14'
}

packagingOptions {
exclude "META-INF/licenses/**"
exclude "META-INF/AL2.0"
Expand Down
1 change: 1 addition & 0 deletions TestingCodelab/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ buildscript {
dependencies {
classpath "com.android.tools.build:gradle:8.4.0"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.0"
classpath "org.jetbrains.kotlin:compose-compiler-gradle-plugin:2.0.0"
}
}

Expand Down
2 changes: 1 addition & 1 deletion TestingCodelab/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.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
5 changes: 1 addition & 4 deletions ThemingCodelab/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'org.jetbrains.kotlin.plugin.compose'
}

android {
Expand Down Expand Up @@ -79,10 +80,6 @@ android {
compose true
}

composeOptions {
kotlinCompilerExtensionVersion '1.5.14'
}

packagingOptions {
excludes += "/META-INF/AL2.0"
excludes += "/META-INF/LGPL2.1"
Expand Down
1 change: 1 addition & 0 deletions ThemingCodelab/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:8.4.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.0"
classpath "org.jetbrains.kotlin:compose-compiler-gradle-plugin:2.0.0"
}
}

Expand Down
2 changes: 1 addition & 1 deletion ThemingCodelab/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.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Loading

0 comments on commit 1279238

Please sign in to comment.