-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
72 lines (58 loc) · 1.57 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
69
70
71
72
import java.text.SimpleDateFormat
plugins {
id 'application'
id 'java-library'
id 'maven-publish'
}
group 'com.reportmill'
version new SimpleDateFormat("yyyy.MM").format(new Date())
sourceSets.main.java.srcDirs = ['src']
sourceSets.main.resources.srcDirs = ['src']
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
repositories {
mavenCentral()
}
dependencies {
// SnapKit project
implementation project(':SnapKit')
// SnapKitGL project
implementation project(':SnapKitGL')
}
mainClassName = 'snapcharts.app.App'
publishing {
repositories {
maven {
name = "GitHubPackages"
url = "https://maven.pkg.github.com/reportmill/SnapCharts"
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
println "GitHubPackages Publish Artifact:\n\tusername=$username\n\ttoken=$password"
}
}
}
publications {
gpr(MavenPublication) {
artifactId 'snapcharts'
from(components.java)
}
}
}
/**
* Build executable jar SnapChartsAll.jar.
*
* We could use the standard jar task just by using jar { ... } and deleting 'baseName' and 'with jar' lines.
*/
task buildExecJar(type: Jar) {
manifest {
attributes 'Main-Class': 'snapcharts.app.App'
}
archiveBaseName = 'SnapChartsAll'
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
with jar
}