Unverified Commit d7e85174 authored by André Sousa's avatar André Sousa Committed by GitHub

Fix Gradle 7 warnings that are now errors in Gradle 8 (#121958)

Fix Gradle 7 warnings that are now errors in Gradle 8
parent 3f2cca8e
......@@ -14,7 +14,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.0'
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
......
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
......@@ -8,8 +8,6 @@
include ':app'
enableFeaturePreview('ONE_LOCKFILE_PER_PROJECT')
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
......
......@@ -149,7 +149,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.0'
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
......@@ -197,8 +197,6 @@ const String settingGradleFile = r'''
include ':app'
enableFeaturePreview('ONE_LOCKFILE_PER_PROJECT')
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
......
......@@ -911,8 +911,8 @@ class FlutterPlugin implements Plugin<Project> {
}
File libJar = project.file("${project.buildDir}/$INTERMEDIATES_DIR/flutter/${variant.name}/libs.jar")
Task packFlutterAppAotTask = project.tasks.create(name: "packLibs${FLUTTER_BUILD_PREFIX}${variant.name.capitalize()}", type: Jar) {
destinationDir libJar.parentFile
archiveName libJar.name
destinationDirectory = libJar.parentFile
archiveFileName = libJar.name
dependsOn compileTask
targetPlatforms.each { targetPlatform ->
String abi = PLATFORM_ARCH_MAP[targetPlatform]
......@@ -961,6 +961,12 @@ class FlutterPlugin implements Plugin<Project> {
variantOutput.processResourcesProvider.get() : variantOutput.processResources
processResources.dependsOn(copyFlutterAssetsTask)
}
// Task compressAssets uses the output of copyFlutterAssetsTask,
// so it's necessary to declare it as an dependency.
def compressAssetsTask = project.tasks.findByName("compress${variant.name.capitalize()}Assets")
if (compressAssetsTask) {
compressAssetsTask.dependsOn copyFlutterAssetsTask
}
return copyFlutterAssetsTask
} // end def addFlutterDeps
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment