-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
95 lines (82 loc) · 2.73 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
plugins {
id 'application'
id 'org.openjfx.javafxplugin' version '0.0.13'
id 'org.beryx.jlink' version '2.25.0'
id 'com.coditory.manifest' version '0.2.1'
id 'antlr'
}
version = '1.0.2'
group = 'nu.mine.mosher.graph'
java {
toolchain {
languageVersion = JavaLanguageVersion.of 17
}
modularity.inferModulePath = true
}
repositories {
mavenCentral()
maven {
url = uri('https://public:\u0067hp_fya6Kseu3XOBMg2icbg7f1LP6ZFYjj35v4Zj@maven.pkg.github.com/cmosher01/*')
}
}
dependencies {
implementation group: 'nu.mine.mosher.io', name: 'log-files', version: 'latest.integration'
implementation group: 'org.slf4j', name: 'jcl-over-slf4j', version: 'latest.integration'
implementation group: 'org.slf4j', name: 'log4j-over-slf4j', version: 'latest.integration'
implementation group: 'org.slf4j', name: 'jul-to-slf4j', version: 'latest.integration'
implementation group: 'org.slf4j', name: 'slf4j-api', version: 'latest.integration'
implementation group: 'ch.qos.logback', name: 'logback-classic', version: 'latest.release'
antlr group: 'org.antlr', name: 'antlr4', version: 'latest.release'
implementation group: 'org.neo4j.driver', name: 'neo4j-java-driver', version: 'latest.release'
}
application {
mainModule = 'nu.mine.mosher.graph.digred'
mainClass = 'nu.mine.mosher.graph.digred.Digred'
}
ext.antlrPackage = 'nu.mine.mosher.graph.digred.schema'
jar {
manifest {
attributes(
'Specification-Version': manifest.attributes.get('Implementation-Version'),
'Implementation-Version': manifest.attributes.get('Implementation-Version').toString()+"+"+manifest.attributes.get('SCM-Commit-Hash').toString()
)
}
}
def os = org.gradle.internal.os.OperatingSystem.current()
println "detected OS: ${os}"
jlink {
mergedModule {
additive = true
requires 'org.slf4j'
excludeProvides servicePattern: 'org.neo4j.driver.internal.*'
excludeProvides servicePattern: 'reactor.blockhound.*'
}
jpackage {
if (os.windows) {
installerOptions += [
'--win-dir-chooser',
'--win-menu',
'--win-shortcut'
]
} else if (os.linux) {
installerOptions += [
'--linux-shortcut'
]
}
installerOptions += [ '--verbose' ]
}
}
assemble {
dependsOn tasks.jpackage
}
generateGrammarSource {
arguments += ['-long-messages', '-package', antlrPackage]
outputDirectory = new File("${project.buildDir}/generated/sources/grammar/antlr/main")
}
sourceSets {
main {
java {
srcDir "${buildDir.absolutePath}/generated/sources/grammar/antlr/main"
}
}
}