Skip to content
Snippets Groups Projects
Commit 4f724a02 authored by Benoît Harrault's avatar Benoît Harrault
Browse files

Merge branch '19-remove-deprecation-in-flutter-gradle-plugin' into 'master'

Resolve "Remove deprecation in flutter gradle plugin"

Closes #19

See merge request !20
parents 3cb728ce 943cf481
No related branches found
No related tags found
1 merge request!20Resolve "Remove deprecation in flutter gradle plugin"
Pipeline #5209 passed
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}
def localProperties = new Properties() def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties') def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) { if (localPropertiesFile.exists()) {
...@@ -14,11 +20,6 @@ if (gradlePropertiesFile.exists()) { ...@@ -14,11 +20,6 @@ if (gradlePropertiesFile.exists()) {
} }
} }
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def appVersionCode = gradleProperties.getProperty('app.versionCode') def appVersionCode = gradleProperties.getProperty('app.versionCode')
if (appVersionCode == null) { if (appVersionCode == null) {
appVersionCode = '1' appVersionCode = '1'
...@@ -29,10 +30,6 @@ if (appVersionName == null) { ...@@ -29,10 +30,6 @@ if (appVersionName == null) {
appVersionName = '1.0' appVersionName = '1.0'
} }
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
def keystoreProperties = new Properties() def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties') def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) { if (keystorePropertiesFile.exists()) {
...@@ -58,7 +55,6 @@ android { ...@@ -58,7 +55,6 @@ android {
versionCode appVersionCode.toInteger() versionCode appVersionCode.toInteger()
versionName appVersionName versionName appVersionName
archivesBaseName = "$applicationId" + "_" + "$versionCode" archivesBaseName = "$applicationId" + "_" + "$versionCode"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }
signingConfigs { signingConfigs {
...@@ -79,10 +75,3 @@ android { ...@@ -79,10 +75,3 @@ android {
flutter { flutter {
source '../..' source '../..'
} }
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
}
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects { allprojects {
repositories { repositories {
google() google()
jcenter() mavenCentral()
} }
} }
......
org.gradle.jvmargs=-Xmx1536M org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true
app.versionName=1.0.17 app.versionName=1.0.18
app.versionCode=18 app.versionCode=19
include ':app' pluginManagement {
def flutterSdkPath = {
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties() def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
def flutterSdkPath = properties.getProperty("flutter.sdk") def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties" assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" return flutterSdkPath
}
settings.ext.flutterSdkPath = flutterSdkPath()
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.2.2" apply false
id "org.jetbrains.kotlin.android" version "1.9.22" apply false
}
include ":app"
Update flutter gradle plugin.
Mise à jour du plugin gradle pour flutter.
name: memory name: memory
description: A simple and classic memory game. description: A simple and classic memory game.
publish_to: 'none' publish_to: 'none'
version: 1.0.17+18 version: 1.0.18+19
environment: environment:
sdk: '^3.0.0' sdk: '^3.0.0'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment