forked from square/javapoet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
56 lines (48 loc) · 1.21 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
plugins {
id 'java'
id 'maven-publish'
}
def ENV = System.getenv()
version = "0.0." + ENV.BUILD_NUMBER ?: 'local'
group = 'com.github.liachmodded'
archivesBaseName = 'javapoet'
repositories {
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'
}
java {
withSourcesJar()
}
tasks.withType(JavaCompile) {
options.release = 17
options.encoding = "UTF-8"
}
tasks.withType(Jar) {
from(file("LICENSE.txt"))
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
repositories {
if (ENV.GITHUB_TOKEN) {
maven {
name = "GitHub"
url = uri("https://maven.pkg.github.com/liachmodded/javapoet")
credentials {
username = ENV.GITHUB_ACTOR
password = ENV.GITHUB_TOKEN
}
}
}
}
}