forked from square/javapoet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
66 lines (55 loc) · 1.37 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
plugins {
id 'java'
id 'eclipse'
id 'maven-publish'
}
sourceCompatibility = 8
targetCompatibility = 8
group 'net.fabricmc'
archivesBaseName = 'javapoet'
def ENV = System.getenv()
version '0.1.1' + (ENV.GITHUB_ACTIONS ? "" : "+local")
repositories {
maven {
name = 'Fabric'
url = 'https://maven.fabricmc.net/'
}
mavenCentral()
}
dependencies {
testImplementation "com.google.truth:truth:1.1.3"
testImplementation 'com.google.testing.compile:compile-testing:0.19'
testImplementation 'junit:junit:4.13.2'
testImplementation 'com.google.jimfs:jimfs:1.2'
testImplementation 'org.mockito:mockito-core:3.12.4'
testImplementation 'org.eclipse.jdt.core.compiler:ecj:4.6.1'
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
if (JavaVersion.current().isJava9Compatible()) {
it.options.release = 8
}
}
java {
withSourcesJar()
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
repositories {
mavenLocal()
if (ENV.MAVEN_URL) {
repositories.maven {
name "fabric"
url ENV.MAVEN_URL
credentials {
username ENV.MAVEN_USERNAME
password ENV.MAVEN_PASSWORD
}
}
}
}
}