Skip to content

Commit b750b96

Browse files
runningcodegetsentry-botclaude
authored
Add build distribution module. (#4699)
* Add build distribution module. This is the first step towards the build distribution library. I named it `sentry-build-distribution` not `sentry-android-build-distribution` because i thought the name was too long. This will only ever be an `android` based sdk so feel free to push back on the naming. * Format code * Add Distribution class * Format code * Rename sentry-build-distribution module to sentry-android-distribution - Renamed module directory from sentry-build-distribution to sentry-android-distribution - Updated settings.gradle.kts to reference new module name - Updated Android namespace from io.sentry.build.distribution to io.sentry.android.distribution - Cleaned up build artifacts 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Don't publish build-distribution, align kotlin versions * Specify explicity visibility * Use Kotlin 2_0 * Use Kotlin 1_9 --------- Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io> Co-authored-by: Claude <noreply@anthropic.com>
1 parent 983ac90 commit b750b96

File tree

6 files changed

+41
-2
lines changed

6 files changed

+41
-2
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ subprojects {
161161
}
162162
}
163163

164-
if (!this.name.contains("sample") && !this.name.contains("integration-tests") && this.name != "sentry-system-test-support" && this.name != "sentry-test-support") {
164+
if (!this.name.contains("sample") && !this.name.contains("integration-tests") && this.name != "sentry-system-test-support" && this.name != "sentry-test-support" && this.name != "sentry-android-distribution") {
165165
apply<DistributionPlugin>()
166166
apply<com.vanniktech.maven.publish.MavenPublishPlugin>()
167167

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
public final class io/sentry/android/distribution/Distribution {
2+
public fun <init> ()V
3+
}
4+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import org.jetbrains.kotlin.config.KotlinCompilerVersion
2+
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
3+
4+
plugins {
5+
id("com.android.library")
6+
alias(libs.plugins.kotlin.android)
7+
}
8+
9+
android {
10+
compileSdk = libs.versions.compileSdk.get().toInt()
11+
namespace = "io.sentry.android.distribution"
12+
13+
defaultConfig { minSdk = libs.versions.minSdk.get().toInt() }
14+
buildFeatures { buildConfig = false }
15+
}
16+
17+
kotlin {
18+
jvmToolchain(17)
19+
compilerOptions.languageVersion = KotlinVersion.KOTLIN_1_9
20+
explicitApi()
21+
}
22+
23+
androidComponents.beforeVariants {
24+
it.enable = !Config.Android.shouldSkipDebugVariant(it.buildType)
25+
}
26+
27+
dependencies {
28+
implementation(projects.sentry)
29+
implementation(kotlin(Config.kotlinStdLib, KotlinCompilerVersion.VERSION))
30+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package io.sentry.android.distribution
2+
3+
public class Distribution {}

sentry-bom/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ dependencies {
99
.filter {
1010
!it.name.startsWith("sentry-samples") &&
1111
it.name != project.name &&
12-
!it.name.contains("test", ignoreCase = true)
12+
!it.name.contains("test", ignoreCase = true) &&
13+
!it.name.contains("sentry-android-distribution")
1314
}
1415
.forEach { project ->
1516
evaluationDependsOn(project.path)

settings.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ includeBuild("build-logic")
2121
include(
2222
"sentry",
2323
"sentry-kotlin-extensions",
24+
"sentry-android-distribution",
2425
"sentry-android-core",
2526
"sentry-android-ndk",
2627
"sentry-android",

0 commit comments

Comments
 (0)