-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.gradle
More file actions
executable file
·81 lines (72 loc) · 2.87 KB
/
build.gradle
File metadata and controls
executable file
·81 lines (72 loc) · 2.87 KB
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
buildscript {
//使用config.gradle统一管理项目的依赖库
apply from: "buildgradle/config.gradle"
apply from: "buildgradle/build/app_build.gradle"
repositories {
//central
maven { url 'https://maven.aliyun.com/repository/central' }
//jcenter&public
maven { url 'https://maven.aliyun.com/repository/public' }
//google
maven { url 'https://maven.aliyun.com/repository/google' }
//gradle-plugin
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
google()
jcenter()
mavenCentral()
maven { url "https://jitpack.io" }
maven { url "https://maven.google.com" }
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.30"
classpath "com.alibaba:arouter-register:1.0.2"
classpath rootProject.ext.jdispatcherPlugin
//https://docs.mongodb.com/realm/sdk/android/install/
classpath "io.realm:realm-gradle-plugin:10.8.0"
}
}
allprojects {
repositories {
//central
maven { url 'https://maven.aliyun.com/repository/central' }
//jcenter&public
maven { url 'https://maven.aliyun.com/repository/public' }
//google
maven { url 'https://maven.aliyun.com/repository/google' }
//gradle-plugin
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
google()
jcenter()
mavenCentral()
maven { url "https://jitpack.io" }
maven { url "https://maven.google.com" }
/**Maven 私服配置*/
// 仓库类型 local dev production
def currentMavenRepositoryType = rootProject.ext.mavenRepo['currentMavenRepositoryType']
def localMavenRepositoryType = rootProject.ext.mavenRepositoryType['local']
maven {
//区分本地仓库和远程仓库,Authentication scheme 'all'(Authentication) is not supported by protocol 'file'
if (currentMavenRepositoryType != localMavenRepositoryType) {
credentials {
username rootProject.ext.mavenRepo['userName']
password rootProject.ext.mavenRepo['password']
}
}
url rootProject.ext.mavenRepo['mavenRepoUrlRelease']
}
maven {
//区分本地仓库和远程仓库,Authentication scheme 'all'(Authentication) is not supported by protocol 'file'
if (currentMavenRepositoryType != localMavenRepositoryType) {
credentials {
username rootProject.ext.mavenRepo['userName']
password rootProject.ext.mavenRepo['password']
}
}
url rootProject.ext.mavenRepo['mavenRepoUrlSnapshots']
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}