Skip to content

Commit

Permalink
[ECO-5020] fix: update AGP plugin
Browse files Browse the repository at this point in the history
- updated AGP plugin to 8.0
- added build config feature
- added support for older AGP versions
  • Loading branch information
ttypic committed Oct 8, 2024
1 parent c6a780f commit 9d05fef
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 16 deletions.
10 changes: 9 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:7.2.0'
classpath 'com.android.tools.build:gradle:8.0.0'
}
}

Expand All @@ -35,6 +35,11 @@ dependencies {
android {
compileSdkVersion 32

// Conditional for compatibility with AGP <4.2.
if (project.android.hasProperty("namespace")) {
namespace 'io.ably.flutter.plugin'
}

// Require Java language level 8 so we can use Method References (used with Lambdas)
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand All @@ -56,6 +61,9 @@ android {
lintOptions {
disable 'InvalidPackage'
}
buildFeatures {
buildConfig true
}
}

apply from: file("./ably-agent.gradle")
3 changes: 0 additions & 3 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
buildscript {
ext.kotlin_version = '1.5.31'

repositories {
google()
mavenCentral()
Expand All @@ -9,7 +7,6 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:7.2.0'
classpath 'com.google.gms:google-services:4.3.10'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

Expand Down
9 changes: 0 additions & 9 deletions test_integration/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,11 @@ if (flutterVersionName == null) {
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 32

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}

lintOptions {
disable 'InvalidPackage'
}
Expand All @@ -57,7 +52,3 @@ android {
flutter {
source '../..'
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
3 changes: 0 additions & 3 deletions test_integration/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
buildscript {
ext.kotlin_version = '1.5.31'

repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

Expand Down

0 comments on commit 9d05fef

Please sign in to comment.