-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.gradle
93 lines (87 loc) · 3.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
maven { url uri("${rootDir}/maven") }
maven { url uri("${rootDir}/maven-p7z") }
mavenLocal()
mavenCentral()
maven { url "https://jitpack.io" }
maven { url "https://maven.aliyun.com/repository/google" }
maven { url "https://maven.aliyun.com/repository/jcenter" }
}
dependencies {
classpath "com.android.tools.build:gradle:$ANDROID_GRADLE_VERSION"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10"
if (Boolean.parseBoolean(userPlugin)) {
classpath "${GROUP_ID}:load-hook-plugin:${SO_PLUGIN_VERSION}"
classpath "${GROUP_ID}:file-plugin:${SO_PLUGIN_VERSION}"
}
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven { url uri("${project.rootProject.rootDir}/maven") }
mavenLocal()
mavenCentral()
maven { url "https://jitpack.io" }
maven { url "https://maven.aliyun.com/repository/google" }
maven { url "https://maven.aliyun.com/repository/jcenter" }
maven { url "https://raw.githubusercontent.com/Android-Mainli/Maven/master" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
subprojects { pro ->
def name = pro.name
if (name == 'app' || name == 'testLibrary' || name == 'p7z') {
return
}
apply plugin: 'maven-publish'
afterEvaluate {
def isJavaProject = true
if (name == 'load-assets-7z' || name == 'android-un7z') {
isJavaProject = false
}
afterEvaluate {
publishing {
publications {
release(MavenPublication) {
groupId GROUP_ID
artifactId pro.name
version SO_PLUGIN_VERSION
if (isJavaProject) {
from components.java
} else {
from components.release
}
if (sourcesJar != null) {
artifact(sourcesJar)
}
}
}
repositories {
maven {
url = file("${rootDir}/maven")
}
}
}
}
}
task uploadAll { task ->
task.group = 'upload'
gradle.projectsEvaluated {
task.dependsOn project.tasks.clean
task.dependsOn project.tasks.build
project.tasks.build.mustRunAfter project.tasks.clean
project.subprojects {
if (it.name != 'app') {
task.dependsOn it.tasks.publish
upload.mustRunAfter project.tasks.build
}
}
}
}
}