-
-
Notifications
You must be signed in to change notification settings - Fork 444
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add gh workflow for testing release builds against AGP matrix (#2439)
- Loading branch information
Showing
17 changed files
with
242 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: AGP Matrix Sample Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- release/** | ||
pull_request: | ||
|
||
jobs: | ||
cancel-previous-workflow: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 # [email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
agp-matrix-sample-release: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
agp: ['7.3.0','7.4.0-rc01','8.0.0-alpha09'] | ||
|
||
name: AGP Matrix Sample Release - AGP ${{ matrix.agp }} | ||
env: | ||
VERSION_AGP: ${{ matrix.agp }} | ||
|
||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Java Version | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
|
||
- name: Build the Release variant | ||
uses: gradle/gradle-build-action@3fbe033aaae657f011f88f29be9e65ed26bd29ef # pin@v2 | ||
with: | ||
cache-read-only: ${{ github.ref != 'refs/heads/main' }} | ||
arguments: sentry-android-integration-tests:sentry-test-agp:assembleRelease |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:tools="http://schemas.android.com/tools" xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
<uses-sdk | ||
tools:overrideLibrary=" | ||
io.sentry.compose, | ||
io.sentry.android.ndk, | ||
androidx.navigation.compose, | ||
androidx.activity.compose, | ||
androidx.compose.animation, | ||
androidx.lifecycle.viewmodel.compose, | ||
androidx.compose.foundation.layout, | ||
androidx.compose.animation.core, | ||
androidx.compose.ui, | ||
androidx.compose.ui.text, | ||
androidx.compose.runtime.saveable, | ||
androidx.compose.ui.graphics, | ||
androidx.compose.ui.unit, | ||
androidx.compose.ui.geometry, | ||
androidx.compose.ui.util"/> | ||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
64 changes: 64 additions & 0 deletions
64
sentry-android-integration-tests/sentry-test-agp/build.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
plugins { | ||
id("com.android.application") | ||
} | ||
|
||
android { | ||
compileSdk = Config.Android.compileSdkVersion | ||
namespace = "io.sentry.test.agp" | ||
|
||
defaultConfig { | ||
applicationId = "io.sentry.test.agp" | ||
minSdk = Config.Android.minSdkVersionOkHttp | ||
targetSdk = Config.Android.targetSdkVersion | ||
versionCode = 1 | ||
versionName = "1.0" | ||
} | ||
|
||
buildTypes { | ||
getByName("release") { | ||
isMinifyEnabled = true | ||
signingConfig = signingConfigs.getByName("debug") // to be able to run release mode | ||
proguardFiles( | ||
getDefaultProguardFile("proguard-android-optimize.txt") | ||
) | ||
ndk { | ||
abiFilters.clear() | ||
abiFilters.add("arm64-v8a") | ||
} | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
buildFeatures { | ||
viewBinding = true | ||
} | ||
signingConfigs { | ||
getByName("debug") { | ||
storeFile = rootProject.file("debug.keystore") | ||
storePassword = "android" | ||
keyAlias = "androiddebugkey" | ||
keyPassword = "android" | ||
} | ||
} | ||
|
||
variantFilter { | ||
if (Config.Android.shouldSkipDebugVariant(buildType.name)) { | ||
ignore = true | ||
} | ||
} | ||
} | ||
dependencies { | ||
// just a mix of different dependencies to test how our logic for checking classes at runtime | ||
// works with r8 | ||
implementation(projects.sentryAndroid) | ||
implementation(projects.sentryAndroidOkhttp) | ||
implementation(projects.sentryAndroidFragment) | ||
implementation(projects.sentryAndroidTimber) | ||
|
||
implementation(Config.Libs.fragment) | ||
implementation(Config.Libs.timber) | ||
|
||
implementation(Config.Libs.retrofit2) | ||
} |
21 changes: 21 additions & 0 deletions
21
sentry-android-integration-tests/sentry-test-agp/proguard-rules.pro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
6 changes: 6 additions & 0 deletions
6
sentry-android-integration-tests/sentry-test-agp/src/main/AndroidManifest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<application> | ||
<activity android:name=".MainActivity"/> | ||
<meta-data android:name="io.sentry.dsn" android:value="https://[email protected]/5428559" /> | ||
</application> | ||
</manifest> |
17 changes: 17 additions & 0 deletions
17
...roid-integration-tests/sentry-test-agp/src/main/java/io/sentry/test/agp/MainActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package io.sentry.test.agp; | ||
|
||
import android.app.Activity; | ||
import android.os.Bundle; | ||
|
||
public class MainActivity extends Activity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
helloWorld(); | ||
} | ||
|
||
public void helloWorld() { | ||
System.out.println("¯\\_(ツ)_/¯"); | ||
} | ||
} |
Oops, something went wrong.