-
Notifications
You must be signed in to change notification settings - Fork 44
Expand file tree
/
Copy pathbuild.gradle
More file actions
62 lines (54 loc) · 2.07 KB
/
build.gradle
File metadata and controls
62 lines (54 loc) · 2.07 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
import groovy.json.JsonSlurper
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.kotlin.compose) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.legacy.kapt) apply false
alias(libs.plugins.android.rust) apply false
// NO FREE
alias(libs.plugins.google.services) apply false
alias(libs.plugins.firebase.crashlytics.plugin) apply false
alias(libs.plugins.firebase.perf.plugin) apply false
}
String findRustlsPlatformVerifierProject() {
var PATH_TO_DEPENDENT_CRATE = "./core-getter/src/main/rust/api_proxy"
def dependencyText = providers.exec {
commandLine("cargo", "metadata", "--format-version", "1", "--manifest-path", "$PATH_TO_DEPENDENT_CRATE/Cargo.toml")
}.standardOutput.asText.get()
def dependencyJson = new JsonSlurper().parseText(dependencyText)
def manifestPath = file(dependencyJson.packages.find { it.name == "rustls-platform-verifier-android" }.manifest_path)
return new File(manifestPath.parentFile, "maven").path
}
allprojects {
repositories {
google()
mavenCentral()
maven { url = "https://jitpack.io" }
// For https://gitlab.com/AuroraOSS/gplayapi
maven { url = "https://gitlab.com/api/v4/projects/18497829/packages/maven" }
// Getter Rust TLS
// Due https://stackoverflow.com/questions/75904120/how-can-i-use-repositories-in-my-android-modules-build-gradle-not-in-top-level
maven {
url = findRustlsPlatformVerifierProject()
metadataSources.artifact()
}
}
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
kotlin {
jvmToolchain(21)
compilerOptions {
jvmTarget = JvmTarget.JVM_21
}
}
if (project.hasProperty('free')) {
project.logger.lifecycle('build without no free lib')
}