-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
84 lines (79 loc) · 3 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply from: "config.gradle"
buildscript {
// ext.kotlin_version = '1.5.20'
ext.kotlin_version = '1.6.10'
repositories {
maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' }
maven { url 'https://maven.aliyun.com/nexus/content/groups/public' }
maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter'}
jcenter()
maven { url "https://jitpack.io" }
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.0"
classpath "io.objectbox:objectbox-gradle-plugin:3.7.0"
// classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
def getXXFUsername() {
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
def userName = properties.getProperty('xxf_android.username')
return userName;
}
def getXXFPassword() {
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
def password = properties.getProperty('xxf_android.password')
return password;
}
allprojects {
repositories {
maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' }
maven { url 'https://maven.aliyun.com/nexus/content/groups/public' }
maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter'}
mavenLocal()
mavenCentral()
maven { url "https://jitpack.io" }
jcenter()
google()
maven {url 'https://maven.aliyun.com/repository/jcenter'}
//发布配置
maven {
url 'https://maven.aliyun.com/repository/public'
}
maven {
credentials {
username getXXFUsername()
password getXXFPassword()
}
url 'https://packages.aliyun.com/maven/repository/2433389-release-RMv0jP/'
}
maven {
credentials {
username getXXFUsername()
password getXXFPassword()
}
url 'https://packages.aliyun.com/maven/repository/2433389-snapshot-Kqt8ID/'
}
}
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'// maven禁止缓存
// resolutionStrategy.force 'com.squareup.okhttp3:okhttp:4.7.2'
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
//全局版本号 发布命令 ./gradlew publish
//您的制品文件具体推送到哪个库,根据您项目目录的build.gradle文件中version字段中是否配置了-SNAPSHOT。
ext {
xxfVersion = "5.2.2.1-SNAPSHOT"
xxfGroup = "com.NBXXF.xxf_android"
}