Skip to content

Commit 8b30ba3

Browse files
runningcoderomtsn
andauthored
Drop support for AGP 7.0-7.3, Gradle 7.0-7.5 (#911)
* Drop support for AGP 7.0-7.3 * Simplify sourcesets * Remove variants * Remove Gradle 7.5 and below compat * Gradle 7.5 drop * Add versions to Sentry ExternalDependenciesReprotTaskTest * Delete unused classes * Update CHANGELOG.md add breaking changes section Co-authored-by: Roman Zavarnitsyn <[email protected]> --------- Co-authored-by: Roman Zavarnitsyn <[email protected]>
1 parent 8b9f966 commit 8b30ba3

30 files changed

+164
-1500
lines changed

.github/workflows/test-matrix-agp-gradle.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
agp: [ "7.3.0" ]
19+
agp: [ "7.4.0" ]
2020
gradle: [ "7.6.4" ]
2121
java: [ "11" ]
2222
groovy: [ "1.2" ]

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66

77
- Enable caching for BundleSourcesTask ([#894](https://github.com/getsentry/sentry-android-gradle-plugin/pull/894)
88

9+
### Breaking Changes
10+
11+
- Drop support for Android Gradle Plugin 7.3.X and below. To continue to use 7.3.X and below use Sentry Android Gradle Plugin 5.7.0. ([#911](https://github.com/getsentry/sentry-android-gradle-plugin/pull/911))
12+
913
### Dependencies
1014

1115
- Bump Android SDK from v8.12.0 to v8.13.3 ([#896](https://github.com/getsentry/sentry-android-gradle-plugin/pull/896), [#914](https://github.com/getsentry/sentry-android-gradle-plugin/pull/914))

plugin-build/build.gradle.kts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ BootstrapAndroidSdk.locateAndroidSdk(project, extra)
2727
val androidSdkPath: String? by extra
2828
val testImplementationAar by configurations.getting // this converts .aar into .jar dependencies
2929

30-
val agp70: SourceSet by sourceSets.creating
31-
val agp74: SourceSet by sourceSets.creating
32-
3330
val shade: Configuration by
3431
configurations.creating {
3532
isCanBeConsumed = false
@@ -39,18 +36,8 @@ val shade: Configuration by
3936
val fixtureClasspath: Configuration by configurations.creating
4037

4138
dependencies {
42-
agp70.compileOnlyConfigurationName(libs.gradleApi)
43-
agp70.compileOnlyConfigurationName(Libs.agp("7.0.4"))
44-
agp70.compileOnlyConfigurationName(project(":common"))
45-
46-
agp74.compileOnlyConfigurationName(libs.gradleApi)
47-
agp74.compileOnlyConfigurationName(Libs.agp("7.4.0"))
48-
agp74.compileOnlyConfigurationName(project(":common"))
49-
5039
compileOnly(libs.gradleApi)
5140
compileOnly(Libs.AGP)
52-
compileOnly(agp70.output)
53-
compileOnly(agp74.output)
5441
compileOnly(libs.proguard)
5542

5643
implementation(libs.asm)
@@ -68,11 +55,7 @@ dependencies {
6855
testImplementation(gradleTestKit())
6956
testImplementation(kotlin("test"))
7057
testImplementation(Libs.AGP)
71-
testImplementation(agp70.output)
72-
testImplementation(agp74.output)
7358
testImplementation(project(":common"))
74-
fixtureClasspath(agp70.output)
75-
fixtureClasspath(agp74.output)
7659
fixtureClasspath(project(":common"))
7760
testImplementation(libs.proguard)
7861
testImplementation(libs.junit)
@@ -187,11 +170,6 @@ gradlePlugin {
187170
}
188171
}
189172

190-
tasks.withType<Jar>().configureEach {
191-
from(agp70.output)
192-
from(agp74.output)
193-
}
194-
195173
tasks.withType<ShadowJar>().configureEach {
196174
archiveClassifier.set("")
197175
configurations = listOf(shade)

plugin-build/src/agp70/kotlin/io/sentry/android/gradle/AGP70Compat.kt

Lines changed: 0 additions & 70 deletions
This file was deleted.

plugin-build/src/agp74/kotlin/io/sentry/android/gradle/AGP74Compat.kt renamed to plugin-build/src/main/kotlin/io/sentry/android/gradle/AGP74Compat.kt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import com.android.build.api.instrumentation.AsmClassVisitorFactory
77
import com.android.build.api.instrumentation.FramesComputationMode
88
import com.android.build.api.instrumentation.InstrumentationParameters
99
import com.android.build.api.instrumentation.InstrumentationScope
10-
import com.android.build.api.variant.AndroidComponentsExtension
1110
import com.android.build.api.variant.CanMinifyCode
1211
import com.android.build.api.variant.Variant
1312
import com.android.build.api.variant.impl.ApplicationVariantImpl
@@ -109,10 +108,3 @@ fun <T : InstrumentationParameters> configureInstrumentationFor74(
109108
variant.instrumentation.setAsmFramesComputationMode(mode)
110109
variant.instrumentation.excludes.set(excludes)
111110
}
112-
113-
fun onVariants74(
114-
androidComponentsExt: AndroidComponentsExtension<*, *, *>,
115-
callback: (Variant) -> Unit,
116-
) {
117-
androidComponentsExt.onVariants(callback = callback)
118-
}

0 commit comments

Comments
 (0)