Skip to content

Commit

Permalink
Merge 697db23 into 93fbd16
Browse files Browse the repository at this point in the history
  • Loading branch information
romtsn committed Dec 22, 2022
2 parents 93fbd16 + 697db23 commit 7ed1a2d
Show file tree
Hide file tree
Showing 10 changed files with 153 additions and 2 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/agp-matrix.yml
@@ -0,0 +1,36 @@
name: AGP Matrix Sample Release

on:
push:
branches:
- main
- release/**
pull_request:

jobs:
agp-matrix-sample-release:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
agp: ['7.3.0','7.4.0-rc01','8.0.0-alpha05']

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
3 changes: 2 additions & 1 deletion buildSrc/src/main/java/Config.kt
@@ -1,6 +1,7 @@
import java.math.BigDecimal

object Config {
val AGP = System.getenv("VERSION_AGP") ?: "7.3.0"
val kotlinVersion = "1.6.10"
val kotlinStdLib = "stdlib-jdk8"

Expand All @@ -11,7 +12,7 @@ object Config {
val composeVersion = "1.1.1"

object BuildPlugins {
val androidGradle = "com.android.tools.build:gradle:7.3.0"
val androidGradle = "com.android.tools.build:gradle:$AGP"
val kotlinGradlePlugin = "gradle-plugin"
val buildConfig = "com.github.gmazzo.buildconfig"
val buildConfigVersion = "3.0.3"
Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Expand Up @@ -6,6 +6,9 @@ org.gradle.parallel=true
# AndroidX required by AGP >= 3.6.x
android.useAndroidX=true

# Required by AGP >= 8.0.x
android.defaults.buildfeatures.buildconfig=true

# Release information
versionName=6.10.0

Expand Down
1 change: 1 addition & 0 deletions sentry-android-integration-tests/README.md
Expand Up @@ -5,3 +5,4 @@
* [App metrics test specification (yaml)](./metrics-test.yml)
* [Espresso-based benchmarks](./sentry-uitest-android-benchmark) - run within SauceLabs (see /.sauce/*.yml)
* [Espresso-based UI tests](./sentry-uitest-android) - run within SauceLabs (see /.sauce/*.yml)
* [Sample app for testing against AGP compatibility matrix](./sentry-test-agp)
@@ -0,0 +1 @@
/build
64 changes: 64 additions & 0 deletions sentry-android-integration-tests/sentry-test-agp/build.gradle.kts
@@ -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.minSdkVersionNdk
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"),
"benchmark-proguard-rules.pro"
)
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.retrofit2)
}
@@ -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
@@ -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://1053864c67cc410aa1ffc9701bd6f93d@o447951.ingest.sentry.io/5428559" />
</application>
</manifest>
@@ -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(\\_(ツ)_/¯");
}
}
3 changes: 2 additions & 1 deletion settings.gradle.kts
Expand Up @@ -58,7 +58,8 @@ include(
"sentry-android-integration-tests:sentry-uitest-android-benchmark",
"sentry-android-integration-tests:sentry-uitest-android",
"sentry-android-integration-tests:test-app-plain",
"sentry-android-integration-tests:test-app-sentry"
"sentry-android-integration-tests:test-app-sentry",
"sentry-android-integration-tests:sentry-test-agp"
)

gradle.beforeProject {
Expand Down

0 comments on commit 7ed1a2d

Please sign in to comment.