-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.gradle
More file actions
63 lines (50 loc) · 1.49 KB
/
build.gradle
File metadata and controls
63 lines (50 loc) · 1.49 KB
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
plugins {
id("java")
id 'com.github.johnrengelman.shadow' version '8.1.1' // Apply the shadow plugin
}
version = "0.2.0"
def originalShadow = 'pcgroups-cli-' + version + '-all.jar'
java {
sourceCompatibility = JavaVersion.VERSION_1_8
}
repositories {
mavenCentral()
maven { url="https://repo1.maven.org/maven2/" }
maven { url="https://central.sonatype.com/repository/maven-snapshots" }
}
dependencies {
implementation project(':') // ':' means root project which is 'pcgroups'
implementation 'info.picocli:picocli:4.7.5'
testImplementation 'io.nats:jnats-server-runner:3.1.0'
testImplementation 'org.junit.jupiter:junit-jupiter:5.14.1'
testImplementation 'org.junit.platform:junit-platform-launcher:1.14.3'
}
shadowJar {
manifest {
attributes 'Main-Class': 'io.synadia.pcg.cli.CgCommand'
}
}
tasks.register('package', Copy) {
dependsOn shadowJar
// we want the file to be called cg.jar
from ('build/libs')
include originalShadow
destinationDir file('build/')
rename originalShadow, "cg.jar"
}
tasks.register('createZip', Zip) {
dependsOn 'package'
archiveFileName = "cg.zip"
destinationDirectory = file('build/')
from (files('README.md', 'build/cg.jar'))
}
tasks.register('createTar', Tar) {
dependsOn 'package'
archiveFileName = "cg.tar"
destinationDirectory = file('build/')
from (files('README.md', 'build/cg.jar'))
}
tasks.register('dist') {
dependsOn createZip
dependsOn createTar
}