Skip to content

Commit 300a72f

Browse files
authored
Remove shadow plugin (#917)
Now that we dropped support for AGP 7.3 and below, we don't need the separate compatibility library/packages allowing us to drop the shadow plugin. This should significantly improve build speeds since we don't need to repackage the jar with every one line change.
1 parent 8b30ba3 commit 300a72f

File tree

5 files changed

+0
-32
lines changed

5 files changed

+0
-32
lines changed

gradle/libs.versions.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" }
2020
dokka = { id = "org.jetbrains.dokka", version = "1.8.10" }
2121
spotless = { id = "com.diffplug.spotless", version = "7.0.0" }
2222
groovyGradlePlugin = { id = "dev.gradleplugins.groovy-gradle-plugin", version = "1.2" }
23-
shadow = { id = "com.github.johnrengelman.shadow", version = "7.1.2" }
2423
mavenPublish = { id = "com.vanniktech.maven.publish", version = "0.27.0" }
2524
androidApplication = { id = "com.android.application", version.ref = "agp" }
2625
androidLibrary = { id = "com.android.library", version.ref = "agp" }

plugin-build/build.gradle.kts

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
21
import io.sentry.android.gradle.internal.ASMifyTask
32
import io.sentry.android.gradle.internal.BootstrapAndroidSdk
43
import java.io.FileInputStream
@@ -18,7 +17,6 @@ plugins {
1817
// we need this plugin in order to include .aar dependencies into a pure java project, which the
1918
// gradle plugin is
2019
id("io.sentry.android.gradle.aar2jar")
21-
alias(libs.plugins.shadow)
2220
alias(libs.plugins.buildConfig)
2321
}
2422

@@ -27,12 +25,6 @@ BootstrapAndroidSdk.locateAndroidSdk(project, extra)
2725
val androidSdkPath: String? by extra
2826
val testImplementationAar by configurations.getting // this converts .aar into .jar dependencies
2927

30-
val shade: Configuration by
31-
configurations.creating {
32-
isCanBeConsumed = false
33-
isCanBeResolved = true
34-
}
35-
3628
val fixtureClasspath: Configuration by configurations.creating
3729

3830
dependencies {
@@ -47,16 +39,9 @@ dependencies {
4739

4840
implementation(libs.sentry)
4941

50-
// compileOnly since we'll be shading the common dependency into the final jar
51-
// but we still need to be able to compile it (this also excludes it from .pom)
52-
compileOnly(project(":common"))
53-
shade(project(":common"))
54-
5542
testImplementation(gradleTestKit())
5643
testImplementation(kotlin("test"))
5744
testImplementation(Libs.AGP)
58-
testImplementation(project(":common"))
59-
fixtureClasspath(project(":common"))
6045
testImplementation(libs.proguard)
6146
testImplementation(libs.junit)
6247
testImplementation(libs.mockitoKotlin)
@@ -170,20 +155,6 @@ gradlePlugin {
170155
}
171156
}
172157

173-
tasks.withType<ShadowJar>().configureEach {
174-
archiveClassifier.set("")
175-
configurations = listOf(shade)
176-
177-
exclude("/kotlin/**")
178-
exclude("/groovy**")
179-
exclude("/org/**")
180-
}
181-
182-
artifacts {
183-
runtimeOnly(tasks.named("shadowJar"))
184-
archives(tasks.named("shadowJar"))
185-
}
186-
187158
spotless {
188159
kotlin {
189160
ktfmt(libs.versions.ktfmt.get()).googleStyle()

plugin-build/settings.gradle.kts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,3 @@ dependencyResolutionManagement {
99

1010
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
1111
}
12-
13-
include(":common")

0 commit comments

Comments
 (0)