-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
58 lines (48 loc) · 1.52 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
apply plugin: 'java'
apply plugin: 'maven-publish'
group = 'ch.adnovum.githubactionspoc'
ext.baseVersion = '0.1.0'
version = baseVersion + '.0-' + (System.getenv('GITHUB_SHA') ?: 'dev').take(7)
// In this section you declare where to find the dependencies of your project
repositories {
mavenCentral()
}
// In this section you declare the dependencies for your production and test code
dependencies {
compile 'com.fasterxml.jackson.dataformat:jackson-dataformat-csv:2.8.8'
testCompile 'junit:junit:4.12'
}
task integrationTest() {
doLast {
println "Dummy integration tests"
}
}
task prepareReleaseArtifact(type: Zip) {
from jar.outputs.files
archiveName 'release.zip'
}
assemble.dependsOn prepareReleaseArtifact
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/adnovum/github-actions-poc")
credentials {
username = project.findProperty("gpr.user")
password = project.findProperty("gpr.token")
}
}
}
publications {
gpr(MavenPublication) {
from(components.java)
}
}
}
task printVersionForCI {
doLast {
// Special syntax for GH Actions so the output can be referenced by other tasks.
// See https://help.github.com/en/actions/automating-your-workflow-with-github-actions/development-tools-for-github-actions#set-an-output-parameter-set-output
print "::set-output name=version::${version}"
}
}