-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
68 lines (58 loc) · 1.8 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
plugins {
id "java-library"
id "maven-publish"
id "com.diffplug.spotless" version "6.6.1"
}
println("Multipacks $version")
def env = System.getenv()
allprojects {
apply plugin: "java-library"
apply plugin: "com.diffplug.spotless"
spotless {
java {
licenseHeaderFile(rootProject.file("HEADER"))
}
}
}
["multipacks-engine", "multipacks-spigot"].forEach {
project(":$it") {
apply plugin: "maven-publish"
java {
withSourcesJar()
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
repositories {
mavenLocal()
if (env.MAVEN_URL) {
maven {
url env.MAVEN_URL
println("Maven: Maven repository URL found in environment variable")
if (env.MAVEN_USERNAME) {
credentials {
username env.MAVEN_USERNAME
password env.MAVEN_PASSWORD
}
}
}
}
if (findProperty("mavenRepo_url")) {
maven {
url "${mavenRepo_url}"
println("Maven: URL ${mavenRepo_url} found from gradle.properties")
if (findProperty("mavenRepo_username")) {
credentials {
username "${mavenRepo_username}"
password "${mavenRepo_password}"
}
}
}
}
}
}
}
}