From 91bc8a0115d831ea830d25cdfa46b0719eeaf180 Mon Sep 17 00:00:00 2001 From: Tom Ha Date: Tue, 26 May 2026 09:46:26 +0100 Subject: [PATCH 1/9] build: Migrate to declarative plugin application --- android/build.gradle | 13 ---------- android/settings.gradle | 26 ++++++++++++++++++- example/android/gradle.properties | 4 +++ .../gradle/wrapper/gradle-wrapper.properties | 2 +- example/android/settings.gradle.kts | 2 +- 5 files changed, 31 insertions(+), 16 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 4595898..e5da8b0 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,19 +1,6 @@ group = "com.apadmi.flutter_security_suite" version = "1.0-SNAPSHOT" -buildscript { - ext.kotlin_version = "1.8.22" - repositories { - google() - mavenCentral() - } - - dependencies { - classpath("com.android.tools.build:gradle:8.7.0") - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version") - } -} - allprojects { repositories { google() diff --git a/android/settings.gradle b/android/settings.gradle index 92ee2bc..d2bc5eb 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -1 +1,25 @@ -rootProject.name = 'flutter_security_suite' +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + }() + + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" // apply true + id "com.android.library" version "8.7.0" apply false + id "org.jetbrains.kotlin.android" version "1.8.22" apply false +} + +include ":app" diff --git a/example/android/gradle.properties b/example/android/gradle.properties index f018a61..475a628 100644 --- a/example/android/gradle.properties +++ b/example/android/gradle.properties @@ -1,3 +1,7 @@ org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError android.useAndroidX=true android.enableJetifier=true +# This builtInKotlin flag was added automatically by Flutter migrator +android.builtInKotlin=false +# This newDsl flag was added automatically by Flutter migrator +android.newDsl=false diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties index afa1e8e..02767eb 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/example/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip diff --git a/example/android/settings.gradle.kts b/example/android/settings.gradle.kts index a439442..98dac97 100644 --- a/example/android/settings.gradle.kts +++ b/example/android/settings.gradle.kts @@ -18,7 +18,7 @@ pluginManagement { plugins { id("dev.flutter.flutter-plugin-loader") version "1.0.0" - id("com.android.application") version "8.7.0" apply false + id("com.android.application") version "8.13.2" apply false id("org.jetbrains.kotlin.android") version "1.8.22" apply false } From b482c20a909f58a9da0efe96b6ce9917e3aaabab Mon Sep 17 00:00:00 2001 From: Tom Ha Date: Tue, 26 May 2026 10:27:24 +0100 Subject: [PATCH 2/9] chore: Bump Android dependencies --- android/build.gradle | 6 +++--- android/gradle/wrapper/gradle-wrapper.properties | 2 +- android/settings.gradle | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index e5da8b0..13f4663 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -14,7 +14,7 @@ apply plugin: "kotlin-android" android { namespace = "com.apadmi.flutter_security_suite" - compileSdk = 35 + compileSdk = 37 compileOptions { sourceCompatibility = JavaVersion.VERSION_11 @@ -39,9 +39,9 @@ android { } dependencies { - implementation("com.scottyab:rootbeer-lib:0.1.1") + implementation("com.scottyab:rootbeer-lib:0.1.2") testImplementation("org.jetbrains.kotlin:kotlin-test") - testImplementation("org.mockito:mockito-core:5.0.0") + testImplementation("org.mockito:mockito-core:5.23.0") } testOptions { diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index cea7a79..5dd3c01 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/android/settings.gradle b/android/settings.gradle index d2bc5eb..761660c 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -18,8 +18,8 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" // apply true - id "com.android.library" version "8.7.0" apply false - id "org.jetbrains.kotlin.android" version "1.8.22" apply false + id "com.android.library" version "9.2.1" apply false + id "org.jetbrains.kotlin.android" version "2.3.21" apply false } include ":app" From a2a2c864db90985242efa6d424d36cdaa0a3da70 Mon Sep 17 00:00:00 2001 From: Tom Ha Date: Tue, 26 May 2026 10:38:24 +0100 Subject: [PATCH 3/9] build: Add support for AGP 9 + built-in Kotlin --- CHANGELOG.md | 4 ++++ android/build.gradle | 18 ++++++++++++------ android/settings.gradle | 1 - 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d97287..77c29a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.1 + +* Adds support for built-in Kotlin. + ## 1.0.0 * Initial public release. diff --git a/android/build.gradle b/android/build.gradle index 13f4663..70ae3c4 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -8,21 +8,27 @@ allprojects { } } +def agpMajor = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0] as int + +if (agpMajor < 9) { + apply plugin: 'kotlin-android' +} apply plugin: "com.android.library" -apply plugin: "kotlin-android" android { namespace = "com.apadmi.flutter_security_suite" - compileSdk = 37 + compileSdk = 36 compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } - kotlinOptions { - jvmTarget = JavaVersion.VERSION_11 + kotlin { + compilerOptions { + jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17 + } } sourceSets { diff --git a/android/settings.gradle b/android/settings.gradle index 761660c..b95c1ea 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -19,7 +19,6 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" // apply true id "com.android.library" version "9.2.1" apply false - id "org.jetbrains.kotlin.android" version "2.3.21" apply false } include ":app" From 5ad8a37daa4eee435edeaadf9b2c0bdc73fed191 Mon Sep 17 00:00:00 2001 From: Tom Ha Date: Tue, 26 May 2026 11:55:17 +0100 Subject: [PATCH 4/9] feat: Update example app to AGP 9 + built-in Kotlin --- .fvmrc | 2 +- CHANGELOG.md | 5 +++-- README.md | 1 + android/build.gradle | 21 ++++++++----------- android/gradle.properties | 11 ++++++++++ example/android/app/build.gradle.kts | 11 +++++----- example/android/gradle.properties | 4 ++-- .../gradle/wrapper/gradle-wrapper.properties | 2 +- example/android/settings.gradle.kts | 4 ++-- example/pubspec.lock | 14 ++++++------- example/pubspec.yaml | 3 ++- pubspec.yaml | 4 ++-- 12 files changed, 47 insertions(+), 35 deletions(-) create mode 100644 android/gradle.properties diff --git a/.fvmrc b/.fvmrc index d80cf57..457360f 100644 --- a/.fvmrc +++ b/.fvmrc @@ -1,3 +1,3 @@ { - "flutter": "3.41.9" + "flutter": "3.44.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 77c29a0..04708a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ -## 1.0.1 +## 1.1.0 -* Adds support for built-in Kotlin. +* Migrates plugin to built-in Kotlin & AGP 9. +* Raises minimum Flutter SDK to 3.44.0 ## 1.0.0 diff --git a/README.md b/README.md index ad0033f..54fe6f6 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ insecure environment. Usage of this plugin has the following requirements: * Minimum Android SDK: 23 +* Minimum Android Gradle Plugin: 9.X * Minimum iOS version: 12.0 ## Usage diff --git a/android/build.gradle b/android/build.gradle index 70ae3c4..451ff8c 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -8,11 +8,6 @@ allprojects { } } -def agpMajor = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0] as int - -if (agpMajor < 9) { - apply plugin: 'kotlin-android' -} apply plugin: "com.android.library" android { @@ -21,13 +16,13 @@ android { compileSdk = 36 compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 + sourceCompatibility = JavaVersion.VERSION_21 + targetCompatibility = JavaVersion.VERSION_21 } kotlin { compilerOptions { - jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17 + jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_21 } } @@ -46,7 +41,6 @@ android { dependencies { implementation("com.scottyab:rootbeer-lib:0.1.2") - testImplementation("org.jetbrains.kotlin:kotlin-test") testImplementation("org.mockito:mockito-core:5.23.0") } @@ -55,10 +49,13 @@ android { useJUnitPlatform() testLogging { - events "passed", "skipped", "failed", "standardOut", "standardError" - outputs.upToDateWhen {false} - showStandardStreams = true + events "passed", "skipped", "failed", "standardOut", "standardError" + outputs.upToDateWhen { false } + showStandardStreams = true } } } } +dependencies { + implementation 'androidx.core:core-ktx:1.18.0' +} diff --git a/android/gradle.properties b/android/gradle.properties new file mode 100644 index 0000000..0597fa1 --- /dev/null +++ b/android/gradle.properties @@ -0,0 +1,11 @@ +android.builtInKotlin=true +android.defaults.buildfeatures.resvalues=true +android.dependency.useConstraints=true +android.enableAppCompileTimeRClass=false +android.newDsl=false +android.r8.optimizedResourceShrinking=false +android.r8.strictFullModeForKeepRules=false +android.sdk.defaultTargetSdkToCompileSdkIfUnset=false +android.uniquePackageNames=false +android.useAndroidX=false +android.usesSdkInManifest.disallowed=false \ No newline at end of file diff --git a/example/android/app/build.gradle.kts b/example/android/app/build.gradle.kts index 71033e5..0397356 100644 --- a/example/android/app/build.gradle.kts +++ b/example/android/app/build.gradle.kts @@ -1,6 +1,5 @@ plugins { id("com.android.application") - id("kotlin-android") // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. id("dev.flutter.flutter-gradle-plugin") } @@ -11,12 +10,14 @@ android { ndkVersion = flutter.ndkVersion compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_21 + targetCompatibility = JavaVersion.VERSION_21 } - kotlinOptions { - jvmTarget = JavaVersion.VERSION_11.toString() + kotlin { + compilerOptions { + jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_21 + } } defaultConfig { diff --git a/example/android/gradle.properties b/example/android/gradle.properties index 475a628..048833c 100644 --- a/example/android/gradle.properties +++ b/example/android/gradle.properties @@ -1,7 +1,7 @@ org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError android.useAndroidX=true android.enableJetifier=true -# This builtInKotlin flag was added automatically by Flutter migrator -android.builtInKotlin=false # This newDsl flag was added automatically by Flutter migrator android.newDsl=false +# This builtInKotlin flag was added automatically by Flutter migrator +android.builtInKotlin=false diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties index 02767eb..2f745f9 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/example/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-all.zip diff --git a/example/android/settings.gradle.kts b/example/android/settings.gradle.kts index 98dac97..2c69157 100644 --- a/example/android/settings.gradle.kts +++ b/example/android/settings.gradle.kts @@ -18,8 +18,8 @@ pluginManagement { plugins { id("dev.flutter.flutter-plugin-loader") version "1.0.0" - id("com.android.application") version "8.13.2" apply false - id("org.jetbrains.kotlin.android") version "1.8.22" apply false + id("com.android.application") version "9.2.1" apply false + id("org.jetbrains.kotlin.android") version "2.3.21" apply false } include(":app") diff --git a/example/pubspec.lock b/example/pubspec.lock index a2df242..5f443cb 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -89,7 +89,7 @@ packages: path: ".." relative: true source: path - version: "0.1.3" + version: "1.0.0" flutter_test: dependency: "direct dev" description: flutter @@ -157,10 +157,10 @@ packages: dependency: transitive description: name: meta - sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394" + sha256: "1741988757a65eb6b36abe716829688cf01910bbf91c34354ff7ec1c3de2b349" url: "https://pub.dev" source: hosted - version: "1.17.0" + version: "1.18.0" path: dependency: transitive description: @@ -250,10 +250,10 @@ packages: dependency: transitive description: name: test_api - sha256: "8161c84903fd860b26bfdefb7963b3f0b68fee7adea0f59ef805ecca346f0c7a" + sha256: "949a932224383300f01be9221c39180316445ecb8e7547f70a41a35bf421fb9e" url: "https://pub.dev" source: hosted - version: "0.7.10" + version: "0.7.11" vector_math: dependency: transitive description: @@ -279,5 +279,5 @@ packages: source: hosted version: "3.1.0" sdks: - dart: ">=3.9.0-0 <4.0.0" - flutter: ">=3.41.0" + dart: ">=3.12.0 <4.0.0" + flutter: ">=3.44.0 <4.0.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 00db27a..ef2a322 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -3,7 +3,8 @@ description: "Demonstrates how to use the flutter_security_suite plugin." publish_to: 'none' environment: - sdk: ^3.7.2 + sdk: ^3.12.0 + flutter: ^3.44.0 dependencies: flutter: diff --git a/pubspec.yaml b/pubspec.yaml index 34cbb76..7beec98 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -4,8 +4,8 @@ version: 1.0.0 homepage: environment: - sdk: ^3.7.2 - flutter: '>=3.41.0' + sdk: ^3.12.0 + flutter: '>=3.44.0' dependencies: flutter: From a132ffdabf3939edebaf0360511bff9e4b777d1a Mon Sep 17 00:00:00 2001 From: Tom Ha Date: Tue, 26 May 2026 12:45:19 +0100 Subject: [PATCH 5/9] docs: Remove incorrect stipulation about AGP 9.X in `README.md` --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 54fe6f6..ad0033f 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,6 @@ insecure environment. Usage of this plugin has the following requirements: * Minimum Android SDK: 23 -* Minimum Android Gradle Plugin: 9.X * Minimum iOS version: 12.0 ## Usage From e57e0cff8d658947b4c59ed1089f6a4281a71672 Mon Sep 17 00:00:00 2001 From: Tom Ha Date: Wed, 27 May 2026 11:39:00 +0100 Subject: [PATCH 6/9] chore: Resolve review feedback --- android/build.gradle | 8 +++----- example/android/app/build.gradle.kts | 2 +- example/pubspec.lock | 2 +- pubspec.yaml | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 451ff8c..f90cd01 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -39,10 +39,6 @@ android { buildConfig = true } - dependencies { - implementation("com.scottyab:rootbeer-lib:0.1.2") - testImplementation("org.mockito:mockito-core:5.23.0") - } testOptions { unitTests.all { @@ -56,6 +52,8 @@ android { } } } + dependencies { - implementation 'androidx.core:core-ktx:1.18.0' + implementation("com.scottyab:rootbeer-lib:0.1.2") + testImplementation("org.mockito:mockito-core:5.23.0") } diff --git a/example/android/app/build.gradle.kts b/example/android/app/build.gradle.kts index 0397356..01edeb2 100644 --- a/example/android/app/build.gradle.kts +++ b/example/android/app/build.gradle.kts @@ -1,6 +1,6 @@ plugins { id("com.android.application") - // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. + // The Flutter Gradle Plugin must be applied after the Android Gradle plugins. id("dev.flutter.flutter-gradle-plugin") } diff --git a/example/pubspec.lock b/example/pubspec.lock index 5f443cb..d0b3557 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -89,7 +89,7 @@ packages: path: ".." relative: true source: path - version: "1.0.0" + version: "1.1.0" flutter_test: dependency: "direct dev" description: flutter diff --git a/pubspec.yaml b/pubspec.yaml index 7beec98..8eb1a64 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_security_suite description: "Security utilities for Flutter apps" -version: 1.0.0 +version: 1.1.0 homepage: environment: From 712e4ed9eee107b1b5ba7073cbb15f84c5af2d6a Mon Sep 17 00:00:00 2001 From: Tom Ha Date: Mon, 1 Jun 2026 15:39:11 +0100 Subject: [PATCH 7/9] chore: Bump Kotlin version --- android/build.gradle | 59 -------------------- android/build.gradle.kts | 81 ++++++++++++++++++++++++++++ android/settings.gradle | 24 --------- android/settings.gradle.kts | 1 + example/android/app/build.gradle.kts | 16 +++--- 5 files changed, 90 insertions(+), 91 deletions(-) delete mode 100644 android/build.gradle create mode 100644 android/build.gradle.kts delete mode 100644 android/settings.gradle create mode 100644 android/settings.gradle.kts diff --git a/android/build.gradle b/android/build.gradle deleted file mode 100644 index f90cd01..0000000 --- a/android/build.gradle +++ /dev/null @@ -1,59 +0,0 @@ -group = "com.apadmi.flutter_security_suite" -version = "1.0-SNAPSHOT" - -allprojects { - repositories { - google() - mavenCentral() - } -} - -apply plugin: "com.android.library" - -android { - namespace = "com.apadmi.flutter_security_suite" - - compileSdk = 36 - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_21 - targetCompatibility = JavaVersion.VERSION_21 - } - - kotlin { - compilerOptions { - jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_21 - } - } - - sourceSets { - main.java.srcDirs += "src/main/kotlin" - test.java.srcDirs += "src/test/kotlin" - } - - defaultConfig { - minSdk = 23 - } - - buildFeatures { - buildConfig = true - } - - - testOptions { - unitTests.all { - useJUnitPlatform() - - testLogging { - events "passed", "skipped", "failed", "standardOut", "standardError" - outputs.upToDateWhen { false } - showStandardStreams = true - } - } - } -} - -dependencies { - implementation("com.scottyab:rootbeer-lib:0.1.2") - testImplementation("org.mockito:mockito-core:5.23.0") -} diff --git a/android/build.gradle.kts b/android/build.gradle.kts new file mode 100644 index 0000000..30ce784 --- /dev/null +++ b/android/build.gradle.kts @@ -0,0 +1,81 @@ +group = "com.apadmi.flutter_security_suite" +version = "1.0-SNAPSHOT" + +buildscript { + val kotlinVersion = "2.3.20" + repositories { + google() + mavenCentral() + } + + dependencies { + classpath("com.android.tools.build:gradle:9.2.1") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion") + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +plugins { + id("com.android.library") +} + +android { + namespace = "com.apadmi.flutter_security_suite" + + compileSdk = 36 + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + + buildFeatures { + buildConfig = true + } + + sourceSets { + getByName("main") { + java.directories += "src/main/kotlin" + } + getByName("test") { + java.directories += "src/test/kotlin" + } + } + + defaultConfig { + minSdk = 23 + } + + testOptions { + unitTests { + isIncludeAndroidResources = true + all { + it.useJUnitPlatform() + + it.outputs.upToDateWhen { false } + + it.testLogging { + events("passed", "skipped", "failed", "standardOut", "standardError") + showStandardStreams = true + } + } + } + } +} + +kotlin { + compilerOptions { + jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17 + } +} + +dependencies { + implementation("com.scottyab:rootbeer-lib:0.1.2") + testImplementation("org.mockito:mockito-core:5.23.0") +} diff --git a/android/settings.gradle b/android/settings.gradle deleted file mode 100644 index b95c1ea..0000000 --- a/android/settings.gradle +++ /dev/null @@ -1,24 +0,0 @@ -pluginManagement { - def flutterSdkPath = { - def properties = new Properties() - file("local.properties").withInputStream { properties.load(it) } - def flutterSdkPath = properties.getProperty("flutter.sdk") - assert flutterSdkPath != null, "flutter.sdk not set in local.properties" - return flutterSdkPath - }() - - includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") - - repositories { - google() - mavenCentral() - gradlePluginPortal() - } -} - -plugins { - id "dev.flutter.flutter-plugin-loader" version "1.0.0" // apply true - id "com.android.library" version "9.2.1" apply false -} - -include ":app" diff --git a/android/settings.gradle.kts b/android/settings.gradle.kts new file mode 100644 index 0000000..c8fa1e6 --- /dev/null +++ b/android/settings.gradle.kts @@ -0,0 +1 @@ +rootProject.name = "flutter_security_suite" \ No newline at end of file diff --git a/example/android/app/build.gradle.kts b/example/android/app/build.gradle.kts index 01edeb2..169dc6c 100644 --- a/example/android/app/build.gradle.kts +++ b/example/android/app/build.gradle.kts @@ -10,14 +10,8 @@ android { ndkVersion = flutter.ndkVersion compileOptions { - sourceCompatibility = JavaVersion.VERSION_21 - targetCompatibility = JavaVersion.VERSION_21 - } - - kotlin { - compilerOptions { - jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_21 - } + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } defaultConfig { @@ -40,6 +34,12 @@ android { } } +kotlin { + compilerOptions { + jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17 + } +} + flutter { source = "../.." } From c8425c2be45d53e3c1a44c643620c7dd77a6cc7e Mon Sep 17 00:00:00 2001 From: Tom Ha Date: Mon, 1 Jun 2026 15:54:54 +0100 Subject: [PATCH 8/9] docs: Add comment explaining lack of Android reverse engineering implementation --- .../com/apadmi/flutter_security_suite/SecuritySuiteImpl.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/android/src/main/kotlin/com/apadmi/flutter_security_suite/SecuritySuiteImpl.kt b/android/src/main/kotlin/com/apadmi/flutter_security_suite/SecuritySuiteImpl.kt index dbc15f6..7b9fdc1 100644 --- a/android/src/main/kotlin/com/apadmi/flutter_security_suite/SecuritySuiteImpl.kt +++ b/android/src/main/kotlin/com/apadmi/flutter_security_suite/SecuritySuiteImpl.kt @@ -16,5 +16,6 @@ class SecuritySuiteImpl( override fun isLikelyEmulator(): Boolean = emulatorChecker.isLikelyEmulator() + // Intentional - Not implemented on Android override fun isReverseEngineered(): Boolean = false } \ No newline at end of file From dff33e6c38d7c517ac4e45f56cbae95bb933a5a6 Mon Sep 17 00:00:00 2001 From: Tom Ha Date: Mon, 1 Jun 2026 16:16:45 +0100 Subject: [PATCH 9/9] chore: Remove dependency on `org.jetbrains.kotlin.android` --- example/android/settings.gradle.kts | 1 - 1 file changed, 1 deletion(-) diff --git a/example/android/settings.gradle.kts b/example/android/settings.gradle.kts index 2c69157..147ad08 100644 --- a/example/android/settings.gradle.kts +++ b/example/android/settings.gradle.kts @@ -19,7 +19,6 @@ pluginManagement { plugins { id("dev.flutter.flutter-plugin-loader") version "1.0.0" id("com.android.application") version "9.2.1" apply false - id("org.jetbrains.kotlin.android") version "2.3.21" apply false } include(":app")