Update template/test compileSdk, targetSdk, ndk versions (#152487)

Updates `compileSdk`, `targetSdk`, and `ndk` versions (former 2 to latest, latter to the version of the ndk we are hosting on CIPD).

Summary of changes:
- Updates mentioned template values
- `compileSdk` 35 requires AGP 8.0+, so updated to 8.1 in many places.
- This also necessitated Gradle upgrades in most places
- This also necessitated moving the `package` xml attribute to the AGP `namespace` field in a couple places (test + template).
- Some tests use the output of `flutter create` but then use intentionally lower AGP versions. [I downgraded the `compileSdk` in these tests.](fee34fd61a)
- [Stopped lockfile generation](82324a2570) script from hitting the `hello_world` example because it uses `.kts` gradle files.
- One test needed [some Gradle options we had already added to templates](6aa187b4b6).
This commit is contained in:
Gray Mackall
2024-08-20 14:33:12 -07:00
committed by GitHub
parent 5a87890277
commit ef9cd32f5a
51 changed files with 403 additions and 280 deletions

View File

@@ -14,6 +14,8 @@ import '../src/context.dart';
// This test requires Java 11 due to the intentionally low version of Gradle.
// It also overrides the template compile sdk version to 34, because using 35
// requires AGP 8.0+.
void main() {
late Directory tempDir;
@@ -31,6 +33,7 @@ void main() {
final VersionTuple versionTuple = VersionTuple(agpVersion: '7.0.0', gradleVersion: '7.5', kotlinVersion: '1.7.10');
final ProcessResult result = await buildFlutterApkWithSpecifiedDependencyVersions(
versions: versionTuple,
compileSdkOverride: '34',
tempDir: tempDir
);
expect(result, const ProcessResultMatcher());
@@ -44,6 +47,7 @@ void main() {
final VersionTuple versionTuple = VersionTuple(agpVersion: '7.0.0', gradleVersion: '7.0.2', kotlinVersion: '1.7.10');
final ProcessResult result = await buildFlutterApkWithSpecifiedDependencyVersions(
versions: versionTuple,
compileSdkOverride: '34',
tempDir: tempDir
);
expect(result, const ProcessResultMatcher());
@@ -56,6 +60,7 @@ void main() {
final VersionTuple versionTuple = VersionTuple(agpVersion: '7.4.0', gradleVersion: '7.5', kotlinVersion: '1.7.0');
final ProcessResult result = await buildFlutterApkWithSpecifiedDependencyVersions(
versions: versionTuple,
compileSdkOverride: '34',
tempDir: tempDir
);