mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
build: fix license generation and analytics build tasks (#4820)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
parent
8c964a15ca
commit
9ad28e924f
4 changed files with 24 additions and 12 deletions
9
.github/workflows/release.yml
vendored
9
.github/workflows/release.yml
vendored
|
|
@ -149,9 +149,6 @@ jobs:
|
|||
ruby-version: '3.4.9'
|
||||
bundler-cache: true
|
||||
|
||||
- name: Export Full Library Licenses
|
||||
run: ./gradlew exportLibraryDefinitions -Pci=true
|
||||
|
||||
- name: Build and Deploy Google Play to Internal Track with Fastlane
|
||||
env:
|
||||
VERSION_NAME: ${{ needs.prepare-build-info.outputs.APP_VERSION_NAME }}
|
||||
|
|
@ -232,9 +229,6 @@ jobs:
|
|||
ruby-version: '3.4.9'
|
||||
bundler-cache: true
|
||||
|
||||
- name: Export Full Library Licenses
|
||||
run: ./gradlew exportLibraryDefinitions -Pci=true
|
||||
|
||||
- name: Build F-Droid with Fastlane
|
||||
env:
|
||||
VERSION_NAME: ${{ needs.prepare-build-info.outputs.APP_VERSION_NAME }}
|
||||
|
|
@ -292,9 +286,6 @@ jobs:
|
|||
build-scan-terms-of-use-url: 'https://gradle.com/terms-of-service'
|
||||
build-scan-terms-of-use-agree: 'yes'
|
||||
|
||||
- name: Export Full Library Licenses
|
||||
run: ./gradlew exportLibraryDefinitions -Pci=true
|
||||
|
||||
- name: Install dependencies for AppImage
|
||||
if: runner.os == 'Linux'
|
||||
run: sudo apt-get update && sudo apt-get install -y libfuse2
|
||||
|
|
|
|||
|
|
@ -316,7 +316,11 @@ dependencies {
|
|||
|
||||
aboutLibraries {
|
||||
// Fetch full license text + funding info from GitHub API when on CI with a token
|
||||
val isCi = providers.gradleProperty("ci").map { it.toBoolean() }.getOrElse(false)
|
||||
val isCi =
|
||||
providers
|
||||
.gradleProperty("ci")
|
||||
.map { it.toBoolean() }
|
||||
.getOrElse(providers.environmentVariable("CI").map { it.toBoolean() }.getOrElse(false))
|
||||
val ghToken = providers.environmentVariable("GITHUB_TOKEN")
|
||||
collect {
|
||||
fetchRemoteLicense = isCi && ghToken.isPresent
|
||||
|
|
@ -334,3 +338,9 @@ aboutLibraries {
|
|||
duplicationRule = DuplicateRule.SIMPLE
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure aboutlibraries.json is always up-to-date during the build.
|
||||
// This is required since AboutLibraries v11+ no longer auto-exports.
|
||||
tasks
|
||||
.matching { it.name.startsWith("process") && it.name.endsWith("Resources") }
|
||||
.configureEach { dependsOn("exportLibraryDefinitions") }
|
||||
|
|
|
|||
|
|
@ -66,7 +66,10 @@ class AnalyticsConventionPlugin : Plugin<Project> {
|
|||
|
||||
plugins.withId("com.datadoghq.dd-sdk-android-gradle-plugin") {
|
||||
tasks.configureEach {
|
||||
if ((name.contains("datadog", ignoreCase = true) || name.contains("uploadMapping", ignoreCase = true)) && name.contains("fdroid", ignoreCase = true)) {
|
||||
if ((name.contains("datadog", ignoreCase = true) ||
|
||||
name.contains("uploadMapping", ignoreCase = true) ||
|
||||
name.contains("buildId", ignoreCase = true)) &&
|
||||
name.contains("fdroid", ignoreCase = true)) {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -194,7 +194,11 @@ dependencies {
|
|||
|
||||
aboutLibraries {
|
||||
// Fetch full license text + funding info from GitHub API when on CI with a token
|
||||
val isCi = providers.gradleProperty("ci").map { it.toBoolean() }.getOrElse(false)
|
||||
val isCi =
|
||||
providers
|
||||
.gradleProperty("ci")
|
||||
.map { it.toBoolean() }
|
||||
.getOrElse(providers.environmentVariable("CI").map { it.toBoolean() }.getOrElse(false))
|
||||
val ghToken = providers.environmentVariable("GITHUB_TOKEN")
|
||||
collect {
|
||||
fetchRemoteLicense = isCi && ghToken.isPresent
|
||||
|
|
@ -212,3 +216,7 @@ aboutLibraries {
|
|||
duplicationRule = DuplicateRule.SIMPLE
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure aboutlibraries.json is always up-to-date during the build.
|
||||
// This is required since AboutLibraries v11+ no longer auto-exports.
|
||||
tasks.named("processResources") { dependsOn("exportLibraryDefinitions") }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue