Skip to content

Commit

Permalink
Set jvmTarget to 17 (#81)
Browse files Browse the repository at this point in the history
* Set jvmTarget to 17

* Remove compileOptions from example app

* setup test matrix

* fix variable substitution

* Update min gradle

* flutter matrix only
  • Loading branch information
vanshg authored Jun 27, 2024
1 parent 17dd784 commit 10d604b
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 14 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,20 @@ jobs:
Android:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
flutter-version: ['3.10.6', '3.22.2']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.10.6' # Set the desired Flutter version here
flutter-version: ${{ matrix.flutter-version }}
channel: 'stable'
- name: Install Dependencies
run: flutter pub get && cd example && flutter pub get && cd ..
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release Notes

## 10.1.2

* Set jvmTarget to 17 in Gradle to fix android specific build issues

## 10.1.1

* Bump to iOS 10.2.0
Expand Down
10 changes: 9 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ android {
minSdk 21
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '17'
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
test.java.srcDirs += 'src/test/kotlin'
Expand Down Expand Up @@ -77,4 +85,4 @@ ktlint {
filter {
exclude { it.file.path.contains(".g.kt") }
}
}
}
9 changes: 0 additions & 9 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,6 @@ android {
namespace "com.smileidentity.flutter.sample"
compileSdk 34

compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

kotlin {
jvmToolchain(17)
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
Expand Down
6 changes: 4 additions & 2 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
buildscript {
ext.kotlin_version = "1.9.10"
// Get AGP version from environment variable or default to 8.1.4
ext.agp_version = System.getenv("AGP_VERSION") ?: "8.1.4"
repositories {
google()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}

dependencies {
classpath 'com.android.tools.build:gradle:8.1.4'
classpath "com.android.tools.build:gradle:$agp_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jlleitschuh.gradle:ktlint-gradle:12.1.1"
}
Expand All @@ -32,4 +34,4 @@ subprojects {

tasks.register("clean", Delete) {
delete rootProject.buildDir
}
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: smile_id
description: The Official Smile ID Flutter SDK
version: 10.1.1
version: 10.1.2
homepage: "https://usesmileid.com"

environment:
Expand Down

0 comments on commit 10d604b

Please sign in to comment.