-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
49 lines (41 loc) · 1.27 KB
/
build.gradle
File metadata and controls
49 lines (41 loc) · 1.27 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
/**
* Template Root Configuration
*/
// 1. DISABLE ROOT BUILD
tasks.register('jar') { enabled = false }
allprojects {
group = project.property('project-group')
repositories {
mavenCentral()
maven {
name = 'papermc'
url = 'https://repo.papermc.io/repository/maven-public/'
}
}
}
subprojects {
// LEAF PROJECT CHECK
// Only apply the module logic to projects that have no children
if (project.childProjects.isEmpty()) {
apply plugin: 'template.module'
}
}
// 2. PUBLISHING ORDER LOGIC
gradle.projectsEvaluated {
def apiProject = findProject(':api')
def commonProject = findProject(':common')
def engineProject = findProject(':platform:papermc:engine')
if (apiProject && commonProject) {
def apiPublish = apiProject.tasks.findByName('publish')
def commonPublish = commonProject.tasks.findByName('publish')
if (apiPublish && commonPublish) {
commonPublish.mustRunAfter(apiPublish)
if (engineProject) {
def enginePublish = engineProject.tasks.findByName('publish')
if (enginePublish) {
enginePublish.mustRunAfter(commonPublish)
}
}
}
}
}