Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump AGP to 7.0.2 #1650

Merged
merged 11 commits into from
Sep 14, 2021
Merged
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
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
# TODO: windows-latest
os: [ubuntu-latest, macos-latest]
# Zulu Community distribution of OpenJDK
java: [ '8', '11' ]
java: [ '11' ]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't remove the matrix because we want to add Java 16 later


steps:
- name: Git checkout
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:

- name: Archive packages
# We need artifacts from only one the builds
if: runner.os == 'Linux' && matrix.java == '8'
if: runner.os == 'Linux' && matrix.java == '11'
uses: actions/upload-artifact@v2
with:
name: ${{ github.sha }}
Expand All @@ -61,7 +61,7 @@ jobs:

- name: Upload coverage to Codecov
# We need coverage data from only one the builds
if: runner.os == 'Linux' && matrix.java == '8'
if: runner.os == 'Linux' && matrix.java == '11'
uses: codecov/codecov-action@v1
with:
name: sentry-java
4 changes: 2 additions & 2 deletions .github/workflows/check-formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
- name: set up JDK 1.8
- name: set up JDK 11
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '8'
java-version: '11'

- name: Cache Gradle packages
uses: actions/cache@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/generate-javadocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
- name: set up JDK 1.8
- name: set up JDK 11
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '8'
java-version: '11'

- name: Cache Gradle packages
uses: actions/cache@v2
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

* Bump AGP to 7.0.2 (#1650)

## 5.2.0-beta.1

* Feat: Add tracestate HTTP header support (#1683)
Expand Down
3 changes: 1 addition & 2 deletions buildSrc/src/main/java/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ object Config {
val springKotlinCompatibleLanguageVersion = "1.3"

object BuildPlugins {
val androidGradle = "com.android.tools.build:gradle:4.2.2"
val androidGradle = "com.android.tools.build:gradle:7.0.2"
val kotlinGradlePlugin = "gradle-plugin"
val buildConfig = "com.github.gmazzo.buildconfig"
val buildConfigVersion = "3.0.0"
Expand Down Expand Up @@ -147,7 +147,6 @@ object Config {
val group = "io.sentry"
val description = "SDK for sentry.io"
val versionNameProp = "versionName"
val buildVersionCodeProp = "buildVersionCode"
}

object CompileOnly {
Expand Down
1 change: 0 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ org.gradle.jvmargs=-Xmx4g -XX:MaxPermSize=512m -XX:MaxMetaspaceSize=1536m -XX:+H
android.useAndroidX=true

# Release information
buildVersionCode=20082
versionName=5.2.0-beta.2-SNAPSHOT

# disable renderscript, it's enabled by default
Expand Down
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.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
3 changes: 0 additions & 3 deletions scripts/bump-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,3 @@ GRADLE_FILEPATH="gradle.properties"
# Replace `versionName` with the given version
VERSION_NAME_PATTERN="versionName"
sed -i "" -e "s/$VERSION_NAME_PATTERN=.*$/$VERSION_NAME_PATTERN=$NEW_VERSION/g" $GRADLE_FILEPATH

# Don't bump `buildVersionCode` since it's bumped after doing the release.
# See comments in `post-release.sh`.
9 changes: 0 additions & 9 deletions scripts/post-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,6 @@ version_digit_to_bump="$( awk "/$VERSION_NAME_PATTERN/" $GRADLE_FILEPATH | egrep
new_version="$( echo $version | sed "s/[0-9]*$/$version_digit_to_bump/g" )"
sed -i "" -e "s/$VERSION_NAME_PATTERN=.*$/$VERSION_NAME_PATTERN=$new_version-SNAPSHOT/g" $GRADLE_FILEPATH

# Increment `buildVersionCode`
# After having incremented the version name (see comments above), the new version
# still has the version code of the version in production. This must be
# incremented to align with the new version.
VERSION_CODE_PATTERN="buildVersionCode"
VERSION_NUMBER="$( awk "/$VERSION_CODE_PATTERN/" $GRADLE_FILEPATH | grep -o '[0-9]\+' )"
((VERSION_NUMBER++))
sed -i "" -e "s/$VERSION_CODE_PATTERN=.*$/$VERSION_CODE_PATTERN=$VERSION_NUMBER/g" $GRADLE_FILEPATH

git add .
git commit -m "Prepare $new_version"
git push
5 changes: 1 addition & 4 deletions sentry-android-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,10 @@ android {

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

versionName = project.version.toString()
versionCode = project.properties[Config.Sentry.buildVersionCodeProp].toString().toInt()

buildConfigField("String", "SENTRY_ANDROID_SDK_NAME", "\"${Config.Sentry.SENTRY_ANDROID_SDK_NAME}\"")

// for AGP 4.1
buildConfigField("String", "VERSION_NAME", "\"$versionName\"")
buildConfigField("String", "VERSION_NAME", "\"${project.version}\"")
}

buildTypes {
Expand Down
5 changes: 1 addition & 4 deletions sentry-android-fragment/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@ android {
targetSdkVersion(Config.Android.targetSdkVersion)
minSdkVersion(Config.Android.minSdkVersion)

versionName = project.version.toString()
versionCode = project.properties[Config.Sentry.buildVersionCodeProp].toString().toInt()

// for AGP 4.1
buildConfigField("String", "VERSION_NAME", "\"$versionName\"")
buildConfigField("String", "VERSION_NAME", "\"${project.version}\"")
}

buildTypes {
Expand Down
5 changes: 1 addition & 4 deletions sentry-android-ndk/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ android {

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

versionName = project.version.toString()
versionCode = project.properties[Config.Sentry.buildVersionCodeProp].toString().toInt()

externalNativeBuild {
cmake {
arguments.add(0, "-DANDROID_STL=c++_static")
Expand All @@ -41,7 +38,7 @@ android {
}

// for AGP 4.1
buildConfigField("String", "VERSION_NAME", "\"$versionName\"")
buildConfigField("String", "VERSION_NAME", "\"${project.version}\"")
}

// we use the default NDK and CMake versions based on the AGP's version
Expand Down
5 changes: 1 addition & 4 deletions sentry-android-okhttp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@ android {
targetSdkVersion(Config.Android.targetSdkVersion)
minSdkVersion(Config.Android.minSdkVersionOkHttp)

versionName = project.version.toString()
versionCode = project.properties[Config.Sentry.buildVersionCodeProp].toString().toInt()

// for AGP 4.1
buildConfigField("String", "VERSION_NAME", "\"$versionName\"")
buildConfigField("String", "VERSION_NAME", "\"${project.version}\"")
}

buildTypes {
Expand Down
5 changes: 1 addition & 4 deletions sentry-android-timber/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,8 @@ android {

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

versionName = project.version.toString()
versionCode = project.properties[Config.Sentry.buildVersionCodeProp].toString().toInt()

// for AGP 4.1
buildConfigField("String", "VERSION_NAME", "\"$versionName\"")
buildConfigField("String", "VERSION_NAME", "\"${project.version}\"")
buildConfigField("String", "SENTRY_TIMBER_SDK_NAME", "\"${Config.Sentry.SENTRY_TIMBER_SDK_NAME}\"")
}

Expand Down
3 changes: 0 additions & 3 deletions sentry-android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ android {
defaultConfig {
targetSdkVersion(Config.Android.targetSdkVersion)
minSdkVersion(Config.Android.minSdkVersionNdk)

versionName = project.version.toString()
versionCode = project.properties[Config.Sentry.buildVersionCodeProp].toString().toInt()
}

buildFeatures {
Expand Down
1 change: 1 addition & 0 deletions sentry-samples/sentry-samples-servlet/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ plugins {
group = "io.sentry.sample.servlet"
version = "0.0.1-SNAPSHOT"
java.sourceCompatibility = JavaVersion.VERSION_1_8
java.targetCompatibility = JavaVersion.VERSION_1_8

repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ plugins {
group = "io.sentry.sample.spring-boot"
version = "0.0.1-SNAPSHOT"
java.sourceCompatibility = JavaVersion.VERSION_1_8
java.targetCompatibility = JavaVersion.VERSION_1_8

repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ plugins {
group = "io.sentry.sample.spring-boot"
version = "0.0.1-SNAPSHOT"
java.sourceCompatibility = JavaVersion.VERSION_1_8
java.targetCompatibility = JavaVersion.VERSION_1_8

repositories {
mavenCentral()
Expand Down
1 change: 1 addition & 0 deletions sentry-samples/sentry-samples-spring/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ plugins {
group = "io.sentry.sample.spring"
version = "0.0.1-SNAPSHOT"
java.sourceCompatibility = JavaVersion.VERSION_1_8
java.targetCompatibility = JavaVersion.VERSION_1_8

repositories {
mavenCentral()
Expand Down
5 changes: 2 additions & 3 deletions sentry.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# how a sentry.properties looks like
defaults.project=android
defaults.org=man
defaults.project=sentry-android
defaults.org=sentry-sdks
auth.token=