-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
66 lines (55 loc) · 1.58 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 "maven-publish"
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
if (System.env.CI == "true") {
def branch
branch = System.env.GITHUB_REF
branch = branch.substring(branch.lastIndexOf("/") + 1)
version = "${project.version}+a${System.env.GITHUB_RUN_NUMBER}.${branch}"
} else {
version = "${project.version}"
}
repositories {
mavenCentral()
}
dependencies {
implementation "com.github.anandvarkeyphilips:json-java-ordered:${project.json_version}"
compile "com.github.anandvarkeyphilips:json-java-ordered:${project.json_version}"
implementation "log4j:log4j:${project.log4j_version}"
compile "log4j:log4j:${project.log4j_version}"
implementation "com.google.guava:guava:${project.guava_version}-jre"
compile "com.google.guava:guava:${project.guava_version}-jre"
}
sourceSets {
main {
java.srcDir "src/main/java"
resources.srcDir "src/main/resources"
}
}
jar {
manifest {
attributes(
"Class-Path": configurations.compile.collect { it.getName() }.join(" "),
"Main-Class": "${project.package}.${project.main_class}"
)
}
from {
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}
from "LICENSE"
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/andantedevs/jGenerators")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("PASSWORD")
}
}
}
}