-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
executable file
·58 lines (50 loc) · 1.36 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
plugins {
id 'java'
id 'net.ltgt.errorprone' version "2.0.2"
id 'maven-publish'
}
group 'com.combatreforged.metis'
version '0.1.13'
def props = new Properties()
def file = file("maven.properties")
if (file.exists()) {
System.out.println("Publishing enabled")
file.withInputStream { props.load(it) }
}
allprojects {
apply plugin: 'java'
apply plugin: 'net.ltgt.errorprone'
apply plugin: 'maven-publish'
version rootProject.version
repositories {
mavenCentral()
maven {
name = 'sonatype-oss'
url = 'https://oss.sonatype.org/content/repositories/snapshots/'
}
maven {
name = "minecraft"
url = 'https://libraries.minecraft.net/'
}
}
dependencies {
errorprone implementation('com.google.errorprone:error_prone_core:2.10.0')
}
compileJava {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
publishing {
repositories {
if (props.containsKey("maven.url")) {
maven {
url props.get("maven.url")
credentials {
username props.get("maven.username")
password props.get("maven.password")
}
}
}
}
}
}