Skip to content

Commit

Permalink
chore: Update Kotlin Gradle plugin to version 1.8.22
Browse files Browse the repository at this point in the history
  • Loading branch information
DimaDemchenko committed Aug 12, 2024
1 parent 9a5f445 commit a040464
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 28 deletions.
40 changes: 14 additions & 26 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id "com.android.application"
id "kotlin-android"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}

Expand All @@ -12,20 +12,21 @@ if (localPropertiesFile.exists()) {
}
}

def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
if (flutterVersionCode == null) {
flutterVersionCode = "1"
}

def flutterVersionName = localProperties.getProperty("flutter.versionName")
if (flutterVersionName == null) {
flutterVersionName = "1.0"
}
def flutterVersionCode = localProperties.getProperty("flutter.versionCode", "1")
def flutterVersionName = localProperties.getProperty("flutter.versionName", "1.0")

android {
namespace = "com.example.demo"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
compileSdk = 34
ndkVersion = "25.1.8937393"

defaultConfig {
applicationId = "com.example.demo"
minSdk = 34
targetSdk = 34
versionCode = flutterVersionCode.toInteger()
versionName = flutterVersionName
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
Expand All @@ -36,22 +37,9 @@ android {
jvmTarget = "1.8"
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "com.example.demo"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
versionCode = flutterVersionCode.toInteger()
versionName = flutterVersionName
}

buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig = signingConfigs.debug
signingConfig = signingConfigs.debug // Replace with your release signingConfig
}
}
}
Expand Down
14 changes: 12 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
buildscript {
ext.kotlin_version = '1.8.22'
repositories {
google()
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.android.tools.build:gradle:8.0.2"
}
}

allprojects {
repositories {
google()
Expand All @@ -8,8 +20,6 @@ allprojects {
rootProject.buildDir = "../build"
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(":app")
}

Expand Down

0 comments on commit a040464

Please sign in to comment.