mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-05-14 01:36:09 -04:00
build: conditionalize JitPack repository for desktop-only builds (#5426)
This commit is contained in:
@@ -20,12 +20,6 @@ pluginManagement {
|
||||
google()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
maven {
|
||||
url = uri("https://jitpack.io")
|
||||
content {
|
||||
includeGroupByRegex("com\\.github\\..*")
|
||||
}
|
||||
}
|
||||
maven { url = uri("../offline-repository") }
|
||||
}
|
||||
}
|
||||
@@ -46,12 +40,6 @@ dependencyResolutionManagement {
|
||||
}
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
maven {
|
||||
url = uri("https://jitpack.io")
|
||||
content {
|
||||
includeGroupByRegex("com\\.github\\..*")
|
||||
}
|
||||
}
|
||||
maven { url = uri("../offline-repository") }
|
||||
}
|
||||
versionCatalogs {
|
||||
|
||||
@@ -21,11 +21,16 @@ pluginManagement {
|
||||
google()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
maven { url = uri("https://jitpack.io") }
|
||||
maven { url = uri("./offline-repository") }
|
||||
}
|
||||
}
|
||||
|
||||
// Desktop-only mode: skip Android-only modules when ANDROID_HOME is unavailable (e.g. Flatpak builds).
|
||||
// Activate via: DESKTOP_ONLY=true ./gradlew :desktop:packageUberJarForCurrentOS
|
||||
val desktopOnly =
|
||||
providers.gradleProperty("desktop.only").orNull?.toBoolean() == true ||
|
||||
System.getenv("DESKTOP_ONLY")?.toBoolean() == true
|
||||
|
||||
plugins {
|
||||
id("org.gradle.toolchains.foojay-resolver") version "1.0.0"
|
||||
id("com.gradle.develocity") version "4.4.1"
|
||||
@@ -50,10 +55,12 @@ dependencyResolutionManagement {
|
||||
url = uri("https://central.sonatype.com/repository/maven-snapshots/")
|
||||
mavenContent { snapshotsOnly() }
|
||||
}
|
||||
maven {
|
||||
url = uri("https://jitpack.io")
|
||||
content {
|
||||
includeGroupByRegex("com\\.github\\..*")
|
||||
if (!desktopOnly) {
|
||||
maven {
|
||||
url = uri("https://jitpack.io")
|
||||
content {
|
||||
includeGroupByRegex("com\\.github\\..*")
|
||||
}
|
||||
}
|
||||
}
|
||||
maven { url = uri("./offline-repository") }
|
||||
@@ -79,12 +86,6 @@ toolchainManagement {
|
||||
}
|
||||
}
|
||||
|
||||
// Desktop-only mode: skip Android-only modules when ANDROID_HOME is unavailable (e.g. Flatpak builds).
|
||||
// Activate via: DESKTOP_ONLY=true ./gradlew :desktop:packageUberJarForCurrentOS
|
||||
val desktopOnly =
|
||||
providers.gradleProperty("desktop.only").orNull?.toBoolean() == true ||
|
||||
System.getenv("DESKTOP_ONLY")?.toBoolean() == true
|
||||
|
||||
include(
|
||||
":core:ble",
|
||||
":core:common",
|
||||
|
||||
Reference in New Issue
Block a user