-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
65 lines (59 loc) · 2.01 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "33.0.0"
minSdkVersion = 23
compileSdkVersion = 33
targetSdkVersion = 33
// We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
ndkVersion = "23.1.7779620"
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle")
classpath("com.facebook.react:react-native-gradle-plugin")
}
}
ext.getConfig = { String name ->
File localPropertiesFile = project.rootProject.file('local.properties')
if (localPropertiesFile?.exists()) {
Properties localProperties = new Properties()
localProperties.load(localPropertiesFile.newDataInputStream())
if (localProperties.containsKey(name)) {
return localProperties.getProperty(name)
}
}
def env = System.getenv(name)
if (env != null) {
return env
}
def prop = System.getProperty(name)
if (prop != null) {
return prop
}
if (project.hasProperty(name)) {
return project.getProperty(name)
}
println("Getting env variable failed, returning empty: set $name as environment variable or as system property in your ~/.gradle/gradle.properties")
return ""
}
allprojects {
repositories {
google()
mavenCentral()
maven {
url "https://maven.pkg.github.com/nevissecurity/nevis-mobile-authentication-sdk-android-package"
credentials {
username = getConfig("GITHUB_USERNAME")
password = getConfig("GITHUB_PERSONAL_ACCESS_TOKEN")
}
}
}
}
// Workaround for a React Native issue, should remain until it is solved: https://github.com/facebook/react-native/issues/44501
gradle.startParameter.excludedTaskNames.addAll(
gradle.startParameter.taskNames.findAll { it.contains("testClasses") }
)