Skip to content

Commit

Permalink
Refine gradle plugin versioning in Android build
Browse files Browse the repository at this point in the history
Signed-off-by: Harry Chen <[email protected]>
  • Loading branch information
Harry-Chen committed Sep 8, 2023
1 parent 68e5928 commit 6319168
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 22 deletions.
8 changes: 2 additions & 6 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
buildscript {
ext.kotlin_version = '1.9.10'
}

plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
Expand Down Expand Up @@ -41,7 +37,7 @@ android {
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$KotlinVersion"
implementation "org.jetbrains.kotlin:kotlin-reflect:$KotlinVersion"
implementation 'androidx.core:core-ktx:1.10.1'
}
2 changes: 2 additions & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
AGPVersion=7.0.4
KotlinVersion=1.9.10
11 changes: 6 additions & 5 deletions android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
#Fri Sep 08 22:01:14 CST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
12 changes: 12 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
plugins {
id 'com.android.library' version "${AGPVersion}"
id 'org.jetbrains.kotlin.android' version "${KotlinVersion}"
}
}

rootProject.name = 'flutter_nfc_kit'
2 changes: 1 addition & 1 deletion example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,5 @@ flutter {
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$KotlinVersion"
}
10 changes: 0 additions & 10 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
buildscript {
ext.kotlin_version = '1.9.10'
}

plugins {
id 'com.android.application' version '7.0.4' apply false
id 'com.android.library' version '7.0.4' apply false
id 'org.jetbrains.kotlin.android' version "$kotlin_version" apply false
}

allprojects {
repositories {
gradlePluginPortal()
Expand Down
2 changes: 2 additions & 0 deletions example/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
AGPVersion=7.0.4
KotlinVersion=1.9.10
5 changes: 5 additions & 0 deletions example/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ pluginManagement {
google()
mavenCentral()
}
plugins {
id 'com.android.application' version "${AGPVersion}"
id 'com.android.library' version "${AGPVersion}"
id 'org.jetbrains.kotlin.android' version "${KotlinVersion}"
}
}

include ':app'
Expand Down

0 comments on commit 6319168

Please sign in to comment.