forked from DUpdateSystem/UpgradeAll
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
79 lines (70 loc) · 2.52 KB
/
build.gradle
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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
kotlin_version = '2.0.10'
kotlin_coroutines_version = '1.8.1'
kotlin_stdlib_version = '1.5.0'
android_ktx_version = "1.13.1"
work_version = '2.9.1'
agp_version = '8.5.2'
}
repositories {
google()
mavenCentral()
maven { url "https://jitpack.io" }
}
dependencies {
classpath "com.android.tools.build:gradle:$agp_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NO FREE
if (!project.hasProperty('free')) {
classpath 'com.google.gms:google-services:4.4.2'
classpath 'com.google.firebase:firebase-crashlytics-gradle:3.0.2'
classpath 'com.google.firebase:perf-plugin:1.4.2'
}
}
}
plugins {
id 'org.jetbrains.kotlin.jvm' version "$kotlin_version"
id 'org.jetbrains.kotlin.android' version "$kotlin_version" apply false
id 'com.google.devtools.ksp' version '2.0.10-1.0.24' apply false
}
import groovy.json.JsonSlurper
String findRustlsPlatformVerifierProject() {
var PATH_TO_DEPENDENT_CRATE = "./core-getter/src/main/rust/api_proxy"
def dependencyText = providers.exec {
// print now working directory
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()
}
}
}
compileKotlin {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_19
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_19
}
}
if (project.hasProperty('free')) {
project.logger.lifecycle('build without no free lib')
}