forked from oblador/react-native-keychain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
84 lines (72 loc) · 2.18 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
// 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", 21)
set("compileSdkVersion", 31)
set("targetSdkVersion", 31)
set("buildToolsVersion", "31.0.0")
}
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:7.1.1")
classpath("com.facebook.react:react-native-gradle-plugin")
/* 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 {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
maven {
url = uri("$rootDir/KeychainExample/node_modules/react-native/android")
}
// Android JSC is installed from npm
maven {
url = uri("$rootDir/KeychainExample/node_modules/jsc-android/dist")
}
mavenCentral {
// We don't want to fetch react-native from Maven Central as there are
// older versions over there.
content {
excludeGroup("com.facebook.react")
}
}
google()
maven {
url = uri("https://www.jitpack.io")
}
}
}
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")
)
}