Skip to content

Commit

Permalink
Merge pull request #237 from DataDog/nogorodnikov/merge-release-1.13.…
Browse files Browse the repository at this point in the history
…0-into-main

Merge `release/1.13.0` branch into `main` branch
  • Loading branch information
0xnm authored Apr 9, 2024
2 parents d603d42 + aac03b4 commit ccdd034
Show file tree
Hide file tree
Showing 86 changed files with 3,606 additions and 905 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Global code owners - RUM Mobile Team

* @DataDog/rum-mobile
* @DataDog/rum-mobile @DataDog/rum-mobile-android

## Docs

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Setup Gradle
uses: gradle/gradle-build-action@v2.4.2
with:
gradle-version: 8.1.1
gradle-version: 8.6

# Manually build the java bytecode
- name: Execute Gradle build
Expand Down
4 changes: 3 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ include:
# SETUP

variables:
CURRENT_CI_IMAGE: "2"
CURRENT_CI_IMAGE: "5"
CI_IMAGE_DOCKER: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/dd-sdk-android-gradle-plugin:$CURRENT_CI_IMAGE
GIT_DEPTH: 5

DD_AGENT_HOST: "$BUILDENV_HOST_IP"
DD_SERVICE: "dd-sdk-android-gradle-plugin"
DD_ENV_TESTS: "ci"
DD_INTEGRATION_JUNIT_5_ENABLED: "true"
DD_CIVISIBILITY_ENABLED: "true"
DD_INSIDE_CI: "true"

stages:
- ci-image
Expand Down
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
# 1.13.0 / 2024-04-09

* [FEATURE] Inject build ID into mapping file upload and SDK host application as well. See [#211](https://github.com/DataDog/dd-sdk-android-gradle-plugin/pull/211)
* [BUGFIX] Add files under kotlin source set to the repository information. See [#212](https://github.com/DataDog/dd-sdk-android-gradle-plugin/pull/212)
* [MAINTENANCE] Remove use of deprecated env variables. See [#188](https://github.com/DataDog/dd-sdk-android-gradle-plugin/pull/188)
* [MAINTENANCE] Next dev version. See [#201](https://github.com/DataDog/dd-sdk-android-gradle-plugin/pull/201)
* [MAINTENANCE] Merge `release/1.12.0` branch into `develop` branch. See [#202](https://github.com/DataDog/dd-sdk-android-gradle-plugin/pull/202)
* [MAINTENANCE] Use version 1.12.0 of plugin for sample apps. See [#204](https://github.com/DataDog/dd-sdk-android-gradle-plugin/pull/204)
* [MAINTENANCE] Update Datadog SDK to version 2.3.0. See [#207](https://github.com/DataDog/dd-sdk-android-gradle-plugin/pull/207)
* [MAINTENANCE] Update build tooling to target API 34. See [#208](https://github.com/DataDog/dd-sdk-android-gradle-plugin/pull/208)
* [MAINTENANCE] Fix CI visibility integration. See [#209](https://github.com/DataDog/dd-sdk-android-gradle-plugin/pull/209)
* [MAINTENANCE] Run functional tests against different AGP versions. See [#214](https://github.com/DataDog/dd-sdk-android-gradle-plugin/pull/214)
* [MAINTENANCE] Update `CODEOWNERS` to include `rum-mobile-android`. See [#213](https://github.com/DataDog/dd-sdk-android-gradle-plugin/pull/213)
* [MAINTENANCE] Update Datadog SDK to version 2.4.0. See [#215](https://github.com/DataDog/dd-sdk-android-gradle-plugin/pull/215)
* [MAINTENANCE] Use snake case for properties in mapping file event. See [#217](https://github.com/DataDog/dd-sdk-android-gradle-plugin/pull/217)
* [MAINTENANCE] Update Datadog SDK to version 2.5.0. See [#218](https://github.com/DataDog/dd-sdk-android-gradle-plugin/pull/218)
* [MAINTENANCE] Update Datadog SDK to version 2.5.1. See [#219](https://github.com/DataDog/dd-sdk-android-gradle-plugin/pull/219)
* [MAINTENANCE] Update CMAKE to 3.22.1 for gitlab builds.. See [#221](https://github.com/DataDog/dd-sdk-android-gradle-plugin/pull/221)
* [MAINTENANCE] Update Datadog SDK to version 2.6.0. See [#223](https://github.com/DataDog/dd-sdk-android-gradle-plugin/pull/223)
* [MAINTENANCE] Update Datadog SDK to version 2.6.1. See [#224](https://github.com/DataDog/dd-sdk-android-gradle-plugin/pull/224)
* [MAINTENANCE] Update Datadog SDK to version 2.6.2. See [#225](https://github.com/DataDog/dd-sdk-android-gradle-plugin/pull/225)
* [MAINTENANCE] Remove non-ASCII characters from test names. See [#226](https://github.com/DataDog/dd-sdk-android-gradle-plugin/pull/226)
* [MAINTENANCE] Tooling update. See [#227](https://github.com/DataDog/dd-sdk-android-gradle-plugin/pull/227)
* [MAINTENANCE] Update AGP to 8.3.1. See [#229](https://github.com/DataDog/dd-sdk-android-gradle-plugin/pull/229)
* [MAINTENANCE] Update Datadog SDK to version 2.7.0. See [#230](https://github.com/DataDog/dd-sdk-android-gradle-plugin/pull/230)
* [MAINTENANCE] Update Datadog SDK to version 2.7.1. See [#231](https://github.com/DataDog/dd-sdk-android-gradle-plugin/pull/231)

# 1.12.0 / 2023-10-30

* [IMPROVEMENT] Make plugin compatible with Kotlin Script. See [#197](https://github.com/DataDog/dd-sdk-android-gradle-plugin/pull/197)
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,15 +215,15 @@ Test methods must follow the Given-When-Then principle, that is they must all co

If present, these steps will always be intruded by one line comments, e.g.: `// Given`.

Based on this principle, the test name should reflect the intent, and use the following pattern: `MUST expected behavior WHEN method() withContext`. To avoid being too verbose, `MUST` will be written `𝕄`, and `WHEN` will be written `𝕎`. The `withContext` part should be concise, and can have a trailing curly braces context section to avoid duplicate names (e.g.: `𝕄 create a span with info 𝕎 intercept() for failing request {5xx}`)
Based on this principle, the test name should reflect the intent, and use the following pattern: `MUST expected behavior WHEN method() withContext`. To avoid being too verbose, `MUST` will be written `M`, and `WHEN` will be written `W`. The `withContext` part should be concise, and can have a trailing curly braces context section to avoid duplicate names (e.g.: `M create a span with info W intercept() for failing request {5xx}`)

Parameters shall have simple local names reflecting their intent, whether they use an `@Forgery` or `@Mock` annotation (or none).

Here's a test method following those conventions:

```kotlin
@Test
fun `𝕄 forward boolean attribute to handler 𝕎 addAttribute()`(
fun `M forward boolean attribute to handler W addAttribute()`(
@StringForgery(StringForgeryType.ALPHABETICAL) key : String,
@BoolForgery value : Boolean
) {
Expand Down
10 changes: 5 additions & 5 deletions Dockerfile.gitlab
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ RUN set -x \
&& apt-get -y clean \
&& rm -rf /var/lib/apt/lists/*

ENV GRADLE_VERSION 8.1.1
ENV ANDROID_COMPILE_SDK 33
ENV ANDROID_BUILD_TOOLS 33.0.1
ENV ANDROID_SDK_TOOLS 7583922
ENV GRADLE_VERSION 8.6
ENV ANDROID_COMPILE_SDK 34
ENV ANDROID_BUILD_TOOLS 34.0.0
ENV ANDROID_SDK_TOOLS 11076708
ENV NDK_VERSION 21.3.6528147
ENV CMAKE_VERSION 3.10.2.4988404
ENV CMAKE_VERSION 3.22.1



Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ datadog {
serviceName = "my-service" // Optional, by default it is read from your Android plugin configuration's package name
site = "US1" // Optional, can be "US1", "EU1" or "US1_FED", etc. (check `DatadogSite` documentation for the full list). Default is "US1"
checkProjectDependencies = "warn" // Optional, can be "warn", "fail" or "none". Default is "fail". Will check if Datadog SDK is in the project dependencies.
mappingFilePath = "path/to/mapping.txt" // Optional, provides a custom mapping file path. Default is "buils/outputs/mapping/{variant}/mapping.txt".
mappingFilePath = "path/to/mapping.txt" // Optional, provides a custom mapping file path. Default is "build/outputs/mapping/{variant}/mapping.txt".
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package com.datadog.gradle.config

object AndroidConfig {

const val TARGET_SDK = 33
const val TARGET_SDK = 34
const val MIN_SDK = 21
const val BUILD_TOOLS_VERSION = "33.0.1"
const val BUILD_TOOLS_VERSION = "34.0.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ package com.datadog.gradle.config
import org.gradle.api.Project
import org.gradle.api.tasks.testing.Test

@Suppress("UnstableApiUsage")
fun Project.junitConfig() {
tasks.withType(Test::class.java) {
jvmArgs(
"--add-opens=java.base/java.lang.invoke=ALL-UNNAMED",
"--add-opens=java.base/java.lang.reflect=ALL-UNNAMED",
"--add-opens=java.base/java.net=ALL-UNNAMED",
"--add-opens=java.base/java.util.concurrent=ALL-UNNAMED",
"--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED",
"--add-opens=java.base/java.util=ALL-UNNAMED"
)
useJUnitPlatform {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

package com.datadog.gradle.config

import com.android.build.gradle.tasks.factory.AndroidUnitTest
import org.gradle.api.JavaVersion
import org.gradle.api.Project
import org.gradle.api.tasks.testing.Test
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import java.io.File

Expand All @@ -21,15 +21,13 @@ fun Project.kotlinConfig() {
}

val moduleName = this@kotlinConfig.name
val javaAgentJar = File(File(rootDir, "libs"), "dd-java-agent-0.67.0.jar")
taskConfig<AndroidUnitTest> {
val javaAgentJar = File(File(rootDir, "libs"), "dd-java-agent-0.98.1.jar")
taskConfig<Test> {
if (environment["DD_INTEGRATION_JUNIT_5_ENABLED"] == "true") {
val variant = variantName.substringBeforeLast("UnitTest")

// set the `env` tag for the test spans
environment("DD_ENV", "ci")
// add custom tags based on the module and variant (debug/release, flavors, …)
environment("DD_TAGS", "test.module:$moduleName,test.variant:$variant")
environment("DD_TAGS", "test.module:$moduleName")

// disable other Datadog integrations that could interact with the Java Agent
environment("DD_INTEGRATIONS_ENABLED", "false")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import java.net.URI

object MavenConfig {

val VERSION = Version(1, 12, 0, Version.Type.Release)
val VERSION = Version(1, 13, 0, Version.Type.Release)
const val GROUP_ID = "com.datadoghq"
const val PUBLICATION = "pluginMaven"
}
Expand Down
4 changes: 2 additions & 2 deletions codecov.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ branch="$VCS_BRANCH_NAME"
pr="$VCS_PULL_REQUEST"
slug="$VCS_SLUG"
tag="$VCS_TAG"
build_url="$CI_BUILD_URL"
build="$CI_BUILD_ID"
build_url="$CI_JOB_URL"
build="$CI_JOB_ID"
job="$CI_JOB_ID"

beta_xcode_partials=""
Expand Down
Loading

0 comments on commit ccdd034

Please sign in to comment.