Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/agp-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
agp: [ '8.7.0','8.8.0','8.9.0' ]
agp: [ '9.1.1', '9.2.0', '9.2.1' ]
integrations: [ true, false ]

name: AGP Matrix Release - AGP ${{ matrix.agp }} - Integrations ${{ matrix.integrations }}
Expand Down
6 changes: 6 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ The project uses **Gradle** with Kotlin DSL. Key build files:
- `buildSrc/` and `build-logic/` - Custom build logic and plugins
- `Makefile` - High-level build commands

### Android toolchain (AGP 9)
- **Minimum AGP:** 9.1.1 (fallback in `buildSrc/src/main/java/Config.kt`, currently 9.2.1)
- **Minimum Gradle:** 9.4.1 (wrapper in `gradle/wrapper/gradle-wrapper.properties`)
- SDK levels live in `gradle/libs.versions.toml` (`compileSdk`, `targetSdk`, `minSdk`)
- **AGP 9 migration:** `gradle.properties` sets `android.builtInKotlin=false` and `android.newDsl=false` until we remove `kotlin-android` and adopt built-in Kotlin / new DSL (required before AGP 10)

## Essential Commands

### Development Workflow
Expand Down
19 changes: 19 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import com.android.build.gradle.AppExtension
import com.android.build.gradle.LibraryExtension
import com.vanniktech.maven.publish.JavaLibrary
import com.vanniktech.maven.publish.JavadocJar
import com.vanniktech.maven.publish.MavenPublishBaseExtension
Expand Down Expand Up @@ -117,6 +119,23 @@ allprojects {
subprojects {
apply { plugin("io.sentry.spotless") }

pluginManager.withPlugin("com.android.library") {
extensions.configure<LibraryExtension> {
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}
}
pluginManager.withPlugin("com.android.application") {
extensions.configure<AppExtension> {
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}
}

plugins.withId(Config.QualityPlugins.detektPlugin) {
configure<DetektExtension> {
buildUponDefaultConfig = true
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/java/Config.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

object Config {
val AGP = System.getenv("VERSION_AGP") ?: "8.13.1"
val AGP = System.getenv("VERSION_AGP") ?: "9.2.1"
val kotlinStdLib = "stdlib-jdk8"
val kotlinStdLibVersionAndroid = "1.9.24"
val kotlinTestJunit = "test-junit"
Expand Down
5 changes: 4 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled

# AndroidX required by AGP >= 3.6.x
android.useAndroidX=true
android.experimental.lint.version=8.13.1
# AGP 9+ migration opt-outs until we remove kotlin-android plugin and adopt built-in Kotlin.
android.builtInKotlin=false
android.newDsl=false
android.experimental.lint.version=9.2.1

# Release information
versionName=8.46.0
Expand Down
5 changes: 5 additions & 0 deletions sentry-android-distribution/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ android {
defaultConfig { minSdk = libs.versions.minSdk.get().toInt() }
buildFeatures { buildConfig = false }

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

testOptions {
unitTests.apply {
isReturnDefaultValues = true
Expand Down
5 changes: 1 addition & 4 deletions sentry-android-replay/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ android {

buildFeatures { compose = true }

composeOptions {
kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get()
useLiveLiterals = false
}
composeOptions { kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get() }

buildTypes {
getByName("debug") { consumerProguardFiles("proguard-rules.pro") }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ internal class SimpleVideoEncoder(
val videoCapabilities =
mediaCodec.codecInfo.getCapabilitiesForType(muxerConfig.mimeType).videoCapabilities

if (!videoCapabilities.bitrateRange.contains(bitRate)) {
if (videoCapabilities != null && !videoCapabilities.bitrateRange.contains(bitRate)) {
options.logger.log(
DEBUG,
"Encoder doesn't support the provided bitRate: $bitRate, the value will be clamped to the closest one",
Expand Down
2 changes: 0 additions & 2 deletions sentry-compose/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ android {
buildConfigField("String", "VERSION_NAME", "\"${project.version}\"")
}

sourceSets["main"].apply { manifest.srcFile("src/androidMain/AndroidManifest.xml") }

buildTypes {
getByName("debug") { consumerProguardFiles("proguard-rules.pro") }
getByName("release") { consumerProguardFiles("proguard-rules.pro") }
Expand Down
Loading