Repository navigation
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
95 lines (88 loc) · 3.89 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
95 lines (88 loc) · 3.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
import org.gradle.platform.Architecture
import org.gradle.platform.BuildPlatformFactory
import org.gradle.platform.OperatingSystem
buildscript {
repositories {
google()
mavenCentral()
if (project.hasProperty("huawei")) {
maven {
url = uri("https://developer.huawei.com/repo/")
content {
includeGroup("com.huawei.agconnect")
}
}
}
}
dependencies {
// classpath(files("libs/gradle-witness.jar"))
// classpath("com.squareup:javapoet:1.13.0")
if (project.hasProperty("huawei")) {
classpath("com.huawei.agconnect:agcp:1.9.5.302")
}
}
}
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.kotlin.plugin.serialization) apply false
alias(libs.plugins.kotlin.plugin.parcelize) apply false
alias(libs.plugins.kotlin.plugin.compose) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.hilt.android) apply false
alias(libs.plugins.google.services) apply false
alias(libs.plugins.dependency.analysis) apply false
}
allprojects {
repositories {
maven {
url = uri("https://oxen.rocks/session-foundation/libsession-util-android/maven")
content {
includeGroup("org.sessionfoundation")
}
}
google()
mavenCentral()
if (project.hasProperty("huawei")) {
maven {
url = uri("https://developer.huawei.com/repo/")
content {
includeGroup("com.huawei.android.hms")
includeGroup("com.huawei.agconnect")
includeGroup("com.huawei.hmf")
includeGroup("com.huawei.hms")
}
}
}
}
}
// Generates gradle/gradle-daemon-jvm.properties. Any vendor's JDK 21 can run the daemon, so CI's
// setup-java JDK and Android Studio's JBR are used as they are; a machine without one downloads
// Adoptium's Temurin release directly rather than through the api.foojay.io index. Adoptium has no
// FreeBSD or other Unix builds, so those get the Linux ones, as Gradle's own foojay lookup does.
tasks.updateDaemonJvm {
val temurin = "21.0.12.1+1"
val release = "https://github.com/adoptium/temurin21-binaries/releases/download/" +
"jdk-${temurin.replace("+", "%2B")}/OpenJDK21U-jdk"
val file = temurin.replace("+", "_")
val linuxAarch64 = uri("${release}_aarch64_linux_hotspot_$file.tar.gz")
val linuxX64 = uri("${release}_x64_linux_hotspot_$file.tar.gz")
languageVersion = JavaLanguageVersion.of(21)
toolchainDownloadUrls = mapOf(
BuildPlatformFactory.of(Architecture.AARCH64, OperatingSystem.LINUX) to linuxAarch64,
BuildPlatformFactory.of(Architecture.X86_64, OperatingSystem.LINUX) to linuxX64,
BuildPlatformFactory.of(Architecture.AARCH64, OperatingSystem.FREE_BSD) to linuxAarch64,
BuildPlatformFactory.of(Architecture.X86_64, OperatingSystem.FREE_BSD) to linuxX64,
BuildPlatformFactory.of(Architecture.AARCH64, OperatingSystem.UNIX) to linuxAarch64,
BuildPlatformFactory.of(Architecture.X86_64, OperatingSystem.UNIX) to linuxX64,
BuildPlatformFactory.of(Architecture.AARCH64, OperatingSystem.MAC_OS) to
uri("${release}_aarch64_mac_hotspot_$file.tar.gz"),
BuildPlatformFactory.of(Architecture.X86_64, OperatingSystem.MAC_OS) to
uri("${release}_x64_mac_hotspot_$file.tar.gz"),
BuildPlatformFactory.of(Architecture.AARCH64, OperatingSystem.WINDOWS) to
uri("${release}_aarch64_windows_hotspot_$file.zip"),
BuildPlatformFactory.of(Architecture.X86_64, OperatingSystem.WINDOWS) to
uri("${release}_x64_windows_hotspot_$file.zip"),
)
toolchainPlatforms = toolchainDownloadUrls.get().keys
}