Skip to content

Commit

Permalink
Updating opentelemetry sdk (#170)
Browse files Browse the repository at this point in the history
* Adding disk buffering otel lib

* Upgrading kotlin version to avoid issues with opentelemetry's kotlin version

* Updating android-plugin module gradle plugin config

* Using gradle version 7.6.2

* Using namespace for android-test/android-test-common module

* Updated notice file's metadata
  • Loading branch information
LikeTheSalad authored Aug 2, 2023
1 parent 55c4406 commit be5ac53
Show file tree
Hide file tree
Showing 18 changed files with 29 additions and 32 deletions.
1 change: 1 addition & 0 deletions android-instrumentation/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ plugins {
}

android {
namespace = "co.elastic.apm.android.instrumentation"
compileSdk androidCompileSdk

defaultConfig {
Expand Down
2 changes: 1 addition & 1 deletion android-instrumentation/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="co.elastic.apm.android.instrumentation" />
<manifest />
1 change: 1 addition & 0 deletions android-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ gradlePlugin {
implementationClass = 'co.elastic.apm.android.plugin.ApmAndroidAgentPlugin'
displayName = "Elastic APM Android Agent"
description = project.description
tags.addAll("Android", "APM", "Elastic", "ELK", "opentelemetry")
}
}
}
4 changes: 4 additions & 0 deletions android-sdk-ktx/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
}

android {
namespace = "co.elastic.apm.android.sdk.kotlin"
compileSdk androidCompileSdk

defaultConfig {
Expand All @@ -24,6 +25,9 @@ android {
sourceCompatibility jvmCompatibility
targetCompatibility jvmCompatibility
}
kotlinOptions {
jvmTarget = jvmCompatibility.toString()
}
}

licensesConfig {
Expand Down
2 changes: 1 addition & 1 deletion android-sdk-ktx/metadata/notice.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dependencies.hash=10B02FCF3F89AE2FB4C10F150B4D3E60
dependencies.hash=83E0E6D9CD40065C79FADBCA67A5607B
2 changes: 1 addition & 1 deletion android-sdk-ktx/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="co.elastic.apm.android.sdk.kotlin" />
<manifest />
2 changes: 2 additions & 0 deletions android-sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ plugins {
}

android {
namespace = "co.elastic.apm.android.sdk"
compileSdk androidCompileSdk
buildFeatures.buildConfig true

defaultConfig {
minSdk androidMinSdk
Expand Down
2 changes: 1 addition & 1 deletion android-sdk/metadata/notice.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dependencies.hash=E031E675FDFA0A70B2D4701CBDC88E2E
dependencies.hash=4803E42B18EE973D53DEF65DEE8E2F66
3 changes: 1 addition & 2 deletions android-sdk/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="co.elastic.apm.android.sdk">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Expand Down
1 change: 1 addition & 0 deletions android-test/android-test-common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ plugins {
}

android {
namespace = "co.elastic.apm.android.test.common"
compileSdk androidCompileSdk

defaultConfig {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="co.elastic.apm.android.test.common" />
<manifest />
3 changes: 2 additions & 1 deletion android-test/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
}
dependencies {
classpath "com.android.tools.build:gradle:$agp_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0"
classpath "co.elastic.apm:android-plugin:$agent_version"
}
}
Expand All @@ -15,6 +15,7 @@ apply plugin: 'org.jetbrains.kotlin.android'
apply plugin: 'co.elastic.apm.android'

android {
namespace = "co.elastic.apm.android.test"
compileSdk androidCompileSdk
testOptions {
unitTests {
Expand Down
3 changes: 1 addition & 2 deletions android-test/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="co.elastic.apm.android.test">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.INTERNET" />

Expand Down
2 changes: 1 addition & 1 deletion android-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ext {
junit_version = '4.13.2'
espresso_version = '3.4.0'
mockito_version = '4.9.0'
agp_version = '7.2.0'
agp_version = '7.3.0'
mockwebserver_version = '4.10.0'
androidCompileSdk = 32
androidMinSdk = 26
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
package co.elastic.apm.compile.tools.publishing.subprojects;

import com.gradle.publish.PluginBundleExtension;
import com.gradle.publish.PublishPlugin;

import org.gradle.api.Project;
import org.gradle.api.plugins.JavaPluginExtension;

import java.util.ArrayList;
import java.util.List;
import org.gradle.plugin.devel.GradlePluginDevelopmentExtension;

public class ApmJavaPublisherPlugin extends BaseApmPublisherPlugin {
private static final String GRADLE_PLUGIN_PROJECT_PLUGIN = "java-gradle-plugin";
Expand All @@ -29,20 +26,12 @@ protected void onApply() {

private void configureGradlePluginPublication() {
project.getPlugins().apply(PublishPlugin.class);
configureGradlePluginPortalBundle(project.getExtensions().getByType(PluginBundleExtension.class));
configureGradlePluginPortalBundle(project.getExtensions().getByType(GradlePluginDevelopmentExtension.class));
}

private void configureGradlePluginPortalBundle(PluginBundleExtension pluginBundle) {
pluginBundle.setWebsite(getWebsiteUrl());
pluginBundle.setVcsUrl(getRepositoryUrl());
pluginBundle.setDescription(project.getDescription());
List<String> tags = new ArrayList<>();
tags.add("Android");
tags.add("APM");
tags.add("Elastic");
tags.add("ELK");
tags.add("opentelemetry");
pluginBundle.setTags(tags);
private void configureGradlePluginPortalBundle(GradlePluginDevelopmentExtension pluginBundle) {
pluginBundle.getWebsite().set(getWebsiteUrl());
pluginBundle.getVcsUrl().set(getRepositoryUrl());
}

private boolean isAGradlePluginProject(Project project) {
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.7.10' apply false
id 'org.jetbrains.kotlin.android' version '1.7.10' apply false
id 'org.jetbrains.kotlin.jvm' version '1.8.22' apply false
id 'org.jetbrains.kotlin.android' version '1.8.22' apply false
id 'co.elastic.apm.publishing'
}

ext {
jvmCompatibility = JavaVersion.VERSION_1_8
androidMinSdk = 24
androidCompileSdk = 32
openTelemetry_version = "1.27.0"
openTelemetry_version = "1.28.0"
androidAnnotations_version = "1.4.0"
bytebuddy_version = "1.12.22"
okhttp_version = '3.11.0'
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Fri Jun 02 14:32:07 CEST 2023
androidGradlePlugin_version=7.2.0
androidGradlePlugin_version=7.3.0
description=APM for Android applications with the Elastic stack
org.gradle.jvmargs=-XX\:MaxMetaspaceSize\=1G
version=0.8.0
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.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit be5ac53

Please sign in to comment.