forked from oblador/react-native-keychain
-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle.kts
89 lines (75 loc) · 2.27 KB
/
build.gradle.kts
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
// Copyright (c) Facebook, Inc. and its affiliates.
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
buildscript {
extra.apply {
set("minSdkVersion", 16)
set("compileSdkVersion", 29)
set("targetSdkVersion", 29)
set("buildToolsVersion", "29.0.3")
}
repositories {
mavenLocal()
google()
jcenter()
maven { url = uri("https://plugins.gradle.org/m2/") }
}
dependencies {
/* https://mvnrepository.com/artifact/com.android.tools.build/gradle?repo=google */
classpath("com.android.tools.build:gradle:4.0.0")
/* https://github.com/radarsh/gradle-test-logger-plugin */
classpath("com.adarshr:gradle-test-logger-plugin:2.0.0")
}
}
//plugins {
// id("com.adarshr.test-logger") version "1.7.0" apply false
//}
allprojects {
repositories {
mavenLocal()
google()
jcenter()
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
maven {
url = uri("$rootDir/KeychainExample/node_modules/react-native/android")
}
}
}
allprojects {
configurations.all {
resolutionStrategy.eachDependency {
when (requested.group) {
"com.android.support" -> useVersion("28.0.0")
"android.arch.lifecycle" -> useVersion("1.1.1")
"android.arch.core" -> useVersion("1.1.1")
"com.facebook.fresco" -> useVersion("2.0.+")
}
when ("${requested.group}:${requested.name}") {
"com.facebook.react:react-native" -> useVersion("0.63.4")
"com.facebook.soloader:soloader" -> useVersion("0.6.+")
}
}
}
}
val updateLibrarySourcesInExample by tasks.registering(Copy::class) {
into("${rootProject.projectDir}/KeychainExample/node_modules/react-native-keychain/")
from("${rootProject.projectDir}/android/src/"){
into("android/src")
}
from("${rootProject.projectDir}/typings/"){
into("typings")
}
from("${rootProject.projectDir}/RNKeychainManager"){
into("RNKeychainManager")
}
from("${rootProject.projectDir}/RNKeychain.xcodeproj"){
into("RNKeychain.xcodeproj")
}
from("${rootProject.projectDir}/index.js")
}
tasks.register("build") {
dependsOn(
updateLibrarySourcesInExample,
gradle.includedBuild("android").task(":app:assemble")
)
}