Skip to content

Commit

Permalink
Lowered Java version to 11 (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tkko authored Dec 22, 2024
1 parent 2786f7b commit d6f6026
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 16 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#### 3.1.0 · 22/12/2024

- Lowered Java version to 11 for better compatibility
- Retracted version 3.0.0

#### 3.0.0 · 20/12/2024

- Improved readme by adding detailed instructions
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ If you want to contribute to this project, please read the [contribution](CONTRI

## Requirements

#### 1. Set kotlin version to 2.0.0 or above and gradle plugin version to 8.3.2
#### 1. Set kotlin version to 1.8.0 or above and gradle plugin version to 8.3.2

If you are
using [legacy imperative apply](https://docs.flutter.dev/release/breaking-changes/flutter-gradle-plugin-apply)

```
// android/build.gradle
buildscript {
ext.kotlin_version = '2.0.0'
ext.kotlin_version = '1.8.0'
...others
dependencies {
Expand All @@ -80,7 +80,7 @@ new [declarative plugin approach](https://docs.gradle.org/8.5/userguide/plugins.
```
// android/settings.gradle
plugins {
id "org.jetbrains.kotlin.android" version "2.0.0" apply false
id "org.jetbrains.kotlin.android" version "1.8.0" apply false
id "com.android.application" version "8.3.2" apply false
...others
}
Expand All @@ -93,17 +93,17 @@ plugins {
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
```

#### 3. Set Java version to 21
#### 3. Set Java version to 11

```
// android/app/build.gradle
compileOptions {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_21.toString()
jvmTarget = '11'
}
```

Expand Down
8 changes: 4 additions & 4 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ group 'fman.ge.smart_auth'
version '1.0-SNAPSHOT'

buildscript {
ext.kotlin_version = '2.0.0'
ext.kotlin_version = '1.7.10'
repositories {
google()
mavenCentral()
Expand Down Expand Up @@ -33,12 +33,12 @@ android {
compileSdk 35

compileOptions {
sourceCompatibility JavaVersion.VERSION_21
targetCompatibility JavaVersion.VERSION_21
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_21.toString()
jvmTarget = '11'
}

sourceSets {
Expand Down
6 changes: 3 additions & 3 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ android {
ndkVersion = flutter.ndkVersion

compileOptions {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_21.toString()
jvmTarget = '11'
}

defaultConfig {
Expand Down
2 changes: 1 addition & 1 deletion example/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pluginManagement {
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "8.3.2" apply false
id "org.jetbrains.kotlin.android" version "2.0.0" apply false
id "org.jetbrains.kotlin.android" version "1.8.0" apply false
}

include ":app"
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: smart_auth
description: Wrapper of Android SMS User Consent API, SMS Retriever API to read one time sms code, get user phone number, OTP, OTC, sms autofill, android autofill
homepage: https://github.com/Tkko/flutter_smart_auth
repository: https://github.com/Tkko/flutter_smart_auth
version: 3.0.0
version: 3.1.0
topics:
- otp
- sms-autofill
Expand Down

0 comments on commit d6f6026

Please sign in to comment.