Skip to content

Commit

Permalink
Merge pull request badoo#192 from LachlanMcKee/update-to-agp-8.0.2
Browse files Browse the repository at this point in the history
Updated AGP to 8.0.2
  • Loading branch information
LachlanMcKee authored Jul 8, 2023
2 parents 0c81cb4 + 3a372fa commit 5ef17a3
Show file tree
Hide file tree
Showing 23 changed files with 111 additions and 36 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
java-version: '17'
- uses: gradle/wrapper-validation-action@v1
- name: "Build project & run tests"
uses: gradle/gradle-build-action@v2
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
java-version: '17'
- uses: gradle/wrapper-validation-action@v1
- uses: gradle/gradle-build-action@v2
- name: Pre build sources before launching emulator
Expand Down
4 changes: 2 additions & 2 deletions binder/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ plugins {
}

java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

tasks.withType<Test> {
Expand Down
6 changes: 5 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ buildscript {
plugins {
id("mvi-core-collect-sarif")
id("com.autonomousapps.dependency-analysis") version libs.versions.dependencyAnalysis.get()
id("com.google.dagger.hilt.android") version("2.45") apply false
id("com.google.dagger.hilt.android") version(libs.versions.daggerVersion.get()) apply false
}

dependencyAnalysis {
Expand All @@ -34,6 +34,10 @@ dependencyAnalysis {
onUnusedDependencies {
severity("fail")
exclude("com.jakewharton.scalpel:scalpel") // Accessed using reflection

// AGP 8.0.2 seems to insist that an app module has these even if there are not tests
exclude("junit:junit")
exclude("androidx.test:runner")
}
}
project(":mvicore-android") {
Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
android.useAndroidX=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false

# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ hamcrest-core = "org.hamcrest:hamcrest-core:1.3"

plugin-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlinVersion" }
plugin-detekt = { module = "io.gitlab.arturbosch.detekt:detekt-gradle-plugin", version.ref = "detekt" }
plugin-android = "com.android.tools.build:gradle:7.4.1"
plugin-android = "com.android.tools.build:gradle:8.0.2"

[plugins]
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
5 changes: 4 additions & 1 deletion jitpack.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
jdk:
- openjdk11
- openjdk17
before_install:
- sdk install java 17.0.1-open
- sdk use java 17.0.1-open
install:
- echo "Building artifacts"
- ./gradlew clean publishToMavenLocal
14 changes: 13 additions & 1 deletion mvicore-android/lint-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="6" by="lint 7.2.2" type="baseline" client="gradle" dependencies="false" name="AGP (7.2.2)" variant="all" version="7.2.2">
<issues format="6" by="lint 8.0.2" type="baseline" client="gradle" dependencies="false" name="AGP (8.0.2)" variant="all" version="8.0.2">

<issue
id="OldTargetApi"
message="Not targeting the latest versions of Android; compatibility modes apply. Consider testing and updating this version. Consult the android.os.Build.VERSION_CODES javadoc for details."
errorLine1=" targetSdk = 33"
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="build.gradle.kts"
line="18"
column="9"/>
</issue>

</issues>
14 changes: 13 additions & 1 deletion mvicore-debugdrawer/lint-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="6" by="lint 7.2.2" type="baseline" client="gradle" dependencies="false" name="AGP (7.2.2)" variant="all" version="7.2.2">
<issues format="6" by="lint 8.0.2" type="baseline" client="gradle" dependencies="false" name="AGP (8.0.2)" variant="all" version="8.0.2">

<issue
id="OldTargetApi"
message="Not targeting the latest versions of Android; compatibility modes apply. Consider testing and updating this version. Consult the android.os.Build.VERSION_CODES javadoc for details."
errorLine1=" targetSdk = 33"
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="build.gradle.kts"
line="17"
column="9"/>
</issue>

</issues>
3 changes: 3 additions & 0 deletions mvicore-demo/mvicore-demo-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,7 @@ dependencies {
implementation(libs.scalpel)
implementation(libs.glide.runtime)
kapt(libs.glide.compiler)

androidTestImplementation(libs.junit4)
androidTestImplementation(libs.androidx.test.runner)
}
14 changes: 13 additions & 1 deletion mvicore-demo/mvicore-demo-app/lint-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="6" by="lint 7.4.1" type="baseline" client="gradle" dependencies="false" name="AGP (7.4.1)" variant="all" version="7.4.1">
<issues format="6" by="lint 8.0.2" type="baseline" client="gradle" dependencies="false" name="AGP (8.0.2)" variant="all" version="8.0.2">

<issue
id="OldTargetApi"
message="Not targeting the latest versions of Android; compatibility modes apply. Consider testing and updating this version. Consult the android.os.Build.VERSION_CODES javadoc for details."
errorLine1=" targetSdk = 33"
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="build.gradle.kts"
line="16"
column="9"/>
</issue>

</issues>
14 changes: 13 additions & 1 deletion mvicore-demo/mvicore-demo-catapi/lint-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="6" by="lint 7.2.2" type="baseline" client="gradle" dependencies="false" name="AGP (7.2.2)" variant="all" version="7.2.2">
<issues format="6" by="lint 8.0.2" type="baseline" client="gradle" dependencies="false" name="AGP (8.0.2)" variant="all" version="8.0.2">

<issue
id="OldTargetApi"
message="Not targeting the latest versions of Android; compatibility modes apply. Consider testing and updating this version. Consult the android.os.Build.VERSION_CODES javadoc for details."
errorLine1=" targetSdk = 33"
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="build.gradle.kts"
line="14"
column="9"/>
</issue>

</issues>
14 changes: 13 additions & 1 deletion mvicore-demo/mvicore-demo-feature1/lint-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="6" by="lint 7.2.2" type="baseline" client="gradle" dependencies="false" name="AGP (7.2.2)" variant="all" version="7.2.2">
<issues format="6" by="lint 8.0.2" type="baseline" client="gradle" dependencies="false" name="AGP (8.0.2)" variant="all" version="8.0.2">

<issue
id="OldTargetApi"
message="Not targeting the latest versions of Android; compatibility modes apply. Consider testing and updating this version. Consult the android.os.Build.VERSION_CODES javadoc for details."
errorLine1=" targetSdk = 33"
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="build.gradle.kts"
line="14"
column="9"/>
</issue>

</issues>
14 changes: 13 additions & 1 deletion mvicore-demo/mvicore-demo-feature2/lint-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="6" by="lint 7.2.2" type="baseline" client="gradle" dependencies="false" name="AGP (7.2.2)" variant="all" version="7.2.2">
<issues format="6" by="lint 8.0.2" type="baseline" client="gradle" dependencies="false" name="AGP (8.0.2)" variant="all" version="8.0.2">

<issue
id="OldTargetApi"
message="Not targeting the latest versions of Android; compatibility modes apply. Consider testing and updating this version. Consult the android.os.Build.VERSION_CODES javadoc for details."
errorLine1=" targetSdk = 33"
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="build.gradle.kts"
line="15"
column="9"/>
</issue>

</issues>
4 changes: 2 additions & 2 deletions mvicore-diff/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ plugins {
}

java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

tasks.withType<Test> {
Expand Down
4 changes: 2 additions & 2 deletions mvicore-plugin/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ plugins {
}

java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

base.archivesBaseName = "mvicore-plugin-common"
Expand Down
6 changes: 3 additions & 3 deletions mvicore-plugin/idea/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
plugins {
id("java")
id("kotlin")
id("org.jetbrains.intellij") version "1.8.0"
id("org.jetbrains.intellij") version "1.15.0"
id("idea")
id("mvi-core-detekt")
}

java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

group = "com.github.badoo.mvicore"
Expand Down
4 changes: 2 additions & 2 deletions mvicore-plugin/middleware/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ plugins {
}

java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

base.archivesBaseName = "mvicore-plugin-middleware"
Expand Down
2 changes: 1 addition & 1 deletion mvicore-plugin/templates/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id("org.jetbrains.intellij") version "1.8.0"
id("org.jetbrains.intellij") version "1.15.0"
}

group = "com.badoo.mvicore"
Expand Down
4 changes: 2 additions & 2 deletions mvicore/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ plugins {
}

java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

tasks.withType<Test> {
Expand Down
4 changes: 0 additions & 4 deletions plugins/publish-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ dependencies {
implementation(libs.plugin.kotlin)
}

tasks.withType(org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompile::class.java).configureEach {
kotlinOptions.jvmTarget = JavaVersion.VERSION_11.name
}

detekt {
buildUponDefaultConfig = true
config.from(file("../../detekt.yml"))
Expand Down
4 changes: 0 additions & 4 deletions plugins/verification-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ dependencies {
implementation(libs.plugin.detekt)
}

tasks.withType(org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompile::class.java).configureEach {
kotlinOptions.jvmTarget = JavaVersion.VERSION_11.name
}

detekt {
buildUponDefaultConfig = true
config.from(file("../../detekt.yml"))
Expand Down
2 changes: 0 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ dependencyResolutionManagement {
}
}

enableFeaturePreview("VERSION_CATALOGS")

include(
":binder",
":mvicore",
Expand Down

0 comments on commit 5ef17a3

Please sign in to comment.