-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
96 lines (73 loc) · 2.76 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin
buildscript {
ext.kotlin_version = "1.9.23"
ext.atomicfu_version = '0.23.2'
ext.version_shadow = "8.1.1"
ext.ksp_version = "1.0.19"
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
plugins {
id 'com.android.application' version '8.2.0' apply false
id 'com.android.library' version '8.2.0' apply false
id 'org.jetbrains.kotlin.android' version "$kotlin_version" apply false
id 'org.jetbrains.kotlin.plugin.serialization' version "$kotlin_version" apply false
id 'org.jetbrains.kotlin.plugin.atomicfu' version "$kotlin_version" apply false
id "com.github.ben-manes.versions" version "0.47.0"
id "com.google.devtools.ksp" version "$kotlin_version-$ksp_version" apply false
}
group 'com.github.UstadMobile.door'
version '0.79.17'
ext.localProperties = new Properties()
//Defaults
ext.localProperties["door.postgresUrl"] = ""
ext.localProperties["door.postgresUser"] = ""
ext.localProperties["door.postgresPass"] = ""
if(project.file("local.properties").exists()) {
ext.localProperties.load(new FileInputStream(project.file("local.properties")))
}
if(System.getenv("DOOR_POSTGRES_URL") != null) {
ext.localProperties["door.postgresUrl"] = System.getenv("DOOR_POSTGRES_URL")
}
if(System.getenv("DOOR_POSTGRES_USER") != null) {
ext.localProperties["door.postgresUser"] = System.getenv("DOOR_POSTGRES_USER")
}
if(System.getenv("DOOR_POSTGRES_PASS") != null) {
ext.localProperties["door.postgresPass"] = System.getenv("DOOR_POSTGRES_PASS")
}
ext {
version_kotlin_wrappers_bom = "1.0.0-pre.721"
version_android_compile_sdk = 34
version_android_target_sdk = 34
}
allprojects {
repositories {
google()
mavenCentral()
}
}
//Find stable updates only as per https://github.com/ben-manes/gradle-versions-plugin
def isNonStable = { String version ->
def hasPreReleaseKeywords = ["BETA", "ALPHA", "RC"].any { it -> version.toUpperCase().contains(it)}
return hasPreReleaseKeywords
}
// https://github.com/ben-manes/gradle-versions-plugin
tasks.named("dependencyUpdates").configure {
rejectVersionIf {
isNonStable(it.candidate.version)
}
}
/**
* This was added as per pull request https://github.com/UstadMobile/door/pull/7 to use a version of node that is
* compatible with Jitpack's out of date version. This can be removed once we move to mavencentral.
*/
//noinspection UnnecessaryQualifiedReference
//noinspection GrUnresolvedAccess
//noinspection ConfigurationAvoidance
rootProject.plugins.withType(NodeJsRootPlugin) {
rootProject.extensions.getByType(NodeJsRootExtension).nodeVersion = "16.15.1"
}