Skip to content

Commit fe868d8

Browse files
committed
Upgrade to AGP 8.x
1 parent 1d0569d commit fe868d8

File tree

9 files changed

+33
-33
lines changed

9 files changed

+33
-33
lines changed

Diff for: .github/workflows/basic.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ jobs:
1010
- uses: actions/checkout@v2
1111
- name: Validate gradle wrapper
1212
uses: gradle/wrapper-validation-action@v1
13-
- name: Set up JDK 11
13+
- name: Set up JDK 17
1414
uses: actions/setup-java@v1
1515
with:
16-
java-version: 11
16+
java-version: 17
1717
- name: Build with Gradle
1818
run: ./gradlew build test

Diff for: app/build.gradle

+9-9
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,30 @@ plugins {
44
}
55

66
android {
7-
compileSdkVersion 32
7+
compileSdkVersion 33
88

99
defaultConfig {
1010
applicationId "com.android.example.lint_usage"
1111
minSdkVersion 21
12-
targetSdkVersion 32
12+
targetSdkVersion 33
1313
versionCode 1
1414
versionName "1.0"
1515
}
1616

1717
compileOptions {
18-
sourceCompatibility JavaVersion.VERSION_1_8
19-
targetCompatibility JavaVersion.VERSION_1_8
18+
sourceCompatibility JavaVersion.VERSION_17
19+
targetCompatibility JavaVersion.VERSION_17
2020
}
2121
kotlinOptions {
22-
jvmTarget = '1.8'
22+
jvmTarget = '17'
2323
}
24-
lintOptions {
24+
namespace 'com.android.example'
25+
lint {
2526
checkDependencies true
26-
textReport true
27-
2827
// Produce report for CI:
2928
// https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/sarif-support-for-code-scanning
30-
sarifOutput file("../lint-results.sarif")
29+
sarifOutput file('../lint-results.sarif')
30+
textReport true
3131
}
3232
}
3333

Diff for: app/src/main/AndroidManifest.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="com.android.example">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
43

54
<!-- Not a real app, just a skeleton to show code depending
65
on library with lint checks producing errors in the report -->

Diff for: build.gradle

+7-11
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
buildscript {
22
ext {
3-
kotlinVersion = '1.6.21'
4-
// Current release: Chipmunk / AGP 7.2
5-
gradlePluginVersion = '7.2.0'
6-
lintVersion = '30.2.0'
7-
// lintVersion = '30.2.0-rc02'
8-
// Upcoming lint target: Dolphin / AGP 7.3
9-
// gradlePluginVersion = '7.3.0-beta01'
10-
// lintVersion = '30.3.0-beta01'
11-
// Upcoming lint target: Electric Eel / AGP 7.4
12-
// gradlePluginVersion = '7.4.0-alpha02'
13-
// lintVersion = '30.4.0-alpha02'
3+
kotlinVersion = '1.8.20'
4+
// Current release: Flamingo / AGP 8.0
5+
//gradlePluginVersion = '8.0.2'
6+
//lintVersion = '31.0.2'
7+
// Current preview release: Hedgehog
8+
gradlePluginVersion = '8.2.0-alpha07'
9+
lintVersion = '31.2.0-alpha07'
1410
}
1511

1612
repositories {

Diff for: checks/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ dependencies {
2222
testImplementation "com.android.tools.lint:lint-tests:$lintVersion"
2323
}
2424

25-
sourceCompatibility = "1.8"
26-
targetCompatibility = "1.8"
25+
sourceCompatibility = "17"
26+
targetCompatibility = "17"

Diff for: gradle.properties

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99

1010
# Specifies the JVM arguments used for the daemon process.
1111
# The setting is particularly useful for tweaking memory settings.
12+
android.defaults.buildfeatures.buildconfig=true
13+
android.nonFinalResIds=false
14+
android.nonTransitiveRClass=true
15+
org.gradle.configuration-cache=true
1216
org.gradle.jvmargs=-Xmx1536m
1317

1418
# When configured, Gradle will run in incubating parallel mode.

Diff for: gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

Diff for: library/build.gradle

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
apply plugin: 'com.android.library'
22

33
android {
4-
compileSdkVersion 32
4+
compileSdkVersion 33
55
defaultConfig {
66
minSdkVersion 19
7-
targetSdkVersion 32
7+
targetSdkVersion 33
88
}
99
compileOptions {
10-
sourceCompatibility JavaVersion.VERSION_1_8
11-
targetCompatibility JavaVersion.VERSION_1_8
10+
sourceCompatibility JavaVersion.VERSION_17
11+
targetCompatibility JavaVersion.VERSION_17
1212
}
13-
lintOptions {
13+
namespace 'com.example.lint.library'
14+
lint {
1415
checkDependencies true
1516
}
1617
}

Diff for: library/src/main/AndroidManifest.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
<manifest package="com.example.lint.library">
1+
<manifest>
22

33
</manifest>

0 commit comments

Comments
 (0)