mirror of
https://github.com/flutter/samples.git
synced 2026-04-19 21:41:43 +00:00
Upgrade android_splash_screen Gradle configuration (#2779)
I noticed that the `android_splash_screen` sample was outdated and was not runnable due to gradle issues. This commit fixes the Gradle setup for the `android_splash_screen` sample. Key changes include: * Upgrading Gradle wrapper from version 6.7 to 8.7. * Migrating to the plugins block in `settings.gradle` and `app/build.gradle` for applying Android, Kotlin, and Flutter Gradle plugins. * Removing the outdated `buildscript` block from the root `build.gradle`. * Updating `compileSdkVersion` and `targetSdkVersion` to 34. * Setting `minSdkVersion` to `flutter.minSdkVersion`. * Adding the `namespace` property as required by newer Android Gradle Plugin versions. * Refactoring Kotlin constant declarations in `MainActivity.kt`. @ericwindmill ## Pre-launch Checklist - [x] I read the [Flutter Style Guide] _recently_, and have followed its advice. - [x] I signed the [CLA]. - [x] I read the [Contributors Guide]. - [x] I have added sample code updates to the [changelog]. - [x] I updated/added relevant documentation (doc comments with `///`). Co-authored-by: Eric Windmill <eric@ericwindmill.com>
This commit is contained in:
@@ -1,16 +1,3 @@
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.5.31'
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:4.1.0'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
@@ -18,12 +5,14 @@ allprojects {
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.buildDir = '../build'
|
||||
rootProject.buildDir = "../build"
|
||||
subprojects {
|
||||
project.buildDir = "${rootProject.buildDir}/${project.name}"
|
||||
project.evaluationDependsOn(':app')
|
||||
}
|
||||
subprojects {
|
||||
project.evaluationDependsOn(":app")
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
tasks.register("clean", Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user