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

Addressing r8 issues #309

Merged
merged 4 commits into from
May 8, 2024
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
2 changes: 1 addition & 1 deletion CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ${next_release_notes}
[float]
===== Features

* New feature: {pull}000[#000]
* Adding consumer R8 rules to address R8 full mode: {pull}309[#309]
////

[[release-notes-0.16.0]]
Expand Down
4 changes: 2 additions & 2 deletions build-tools/processor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ dependencies {
}

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

@AutoService(Processor.class)
@SupportedAnnotationTypes("co.elastic.apm.compile.processor.annotations.AutoInstrumentation")
@SupportedSourceVersion(SourceVersion.RELEASE_8)
@SupportedSourceVersion(SourceVersion.RELEASE_11)
public class AutoInstrumentationProcessor extends AbstractProcessor {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.CLASS)
@Retention(RetentionPolicy.SOURCE)
@Target(ElementType.TYPE)
public @interface AutoInstrumentation {
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Wed Apr 03 14:24:32 UTC 2024
androidGradlePlugin_version=7.4.0
androidGradlePlugin_version=8.2.0
description=APM for Android applications with the Elastic stack
org.gradle.jvmargs=-XX\:MaxMetaspaceSize\=2G
version=0.17.0
Expand Down
7 changes: 5 additions & 2 deletions sample-app/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ android {

buildTypes {
release {
minifyEnabled false
minifyEnabled true
signingConfig signingConfigs.debug
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
coreLibraryDesugaringEnabled true
}
kotlinOptions {
jvmTarget = '1.8'
Expand All @@ -44,7 +46,8 @@ elasticApm {

dependencies {
def lifecycle_version = "2.4.0"
def retrofit_version = "2.9.0"
def retrofit_version = "2.11.0"
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'
implementation "androidx.lifecycle:lifecycle-viewmodel:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
implementation 'androidx.core:core-ktx:1.7.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,23 @@ package co.elastic.apm.android.sample

import android.app.Application
import co.elastic.apm.android.sdk.ElasticApmAgent
import co.elastic.apm.android.sdk.ElasticApmConfiguration
import co.elastic.apm.android.sdk.configuration.logging.LogLevel
import co.elastic.apm.android.sdk.configuration.logging.LoggingPolicy
import co.elastic.apm.android.sdk.features.persistence.PersistenceConfiguration

class MyApp : Application() {

override fun onCreate() {
super.onCreate()
ElasticApmAgent.initialize(this)
ElasticApmAgent.initialize(
this,
ElasticApmConfiguration.builder()
.setPersistenceConfiguration(
PersistenceConfiguration.builder().setEnabled(true).build()
)
.setLibraryLoggingPolicy(LoggingPolicy.enabled(LogLevel.TRACE))
.build()
)
}
}
4 changes: 2 additions & 2 deletions sample-app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '7.4.0' apply false
id 'com.android.library' version '7.4.0' apply false
id 'com.android.application' version '8.2.0' apply false
id 'com.android.library' version '8.2.0' apply false
id 'org.jetbrains.kotlin.android' version '1.8.22' apply false
}
2 changes: 1 addition & 1 deletion sample-app/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.6.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
9 changes: 9 additions & 0 deletions shared-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,12 @@
-keep class co.elastic.apm.android.common.okhttp.eventlistener.Generated_CompositeEventListener {
public <methods>;
}

-dontwarn com.fasterxml.jackson.**
-dontwarn com.google.auto.value.**
-dontwarn com.google.common.io.ByteStreams
-dontwarn com.google.errorprone.annotations.**
-dontwarn io.grpc.**
-dontwarn java.awt.**
-dontwarn javax.json.bind.spi.JsonbProvider
-dontwarn org.osgi.annotation.bundle.Export
Loading