-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
87 lines (72 loc) · 2.65 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
plugins {
id 'application'
id 'org.graalvm.buildtools.native' version '0.9.22'
id "org.gretty" version "3.0.5" apply false
}
group = 'de.interactive_instruments'
version = '1.0.0'
repositories {
//mavenLocal()
maven {
url "https://dl.interactive-instruments.de/repository/maven-snapshots/"
}
maven {
url "https://dl.interactive-instruments.de/repository/maven-releases/"
}
mavenCentral()
}
dependencies {
implementation group: 'de.interactive_instruments', name: 'ldproxy-cfg', version: '4.1.0-auto-styles-SNAPSHOT'
implementation group: 'org.slf4j', name: 'slf4j-nop', version: '1.7.35'
// use this instead for debugging purposes
//implementation group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.35'
compileOnly group: 'org.graalvm.nativeimage', name: 'svm', version: '22.3.2'
}
application {
mainClass = 'de.ii.xtraplatform.cli.XtraCfg'
}
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'minutes'
}
graalvmNative {
/*agent {
enableExperimentalPredefinedClasses = true
}*/
binaries.all {
imageName = "xtracfg"
verbose = true
fallback = false
quickBuild = false
richOutput = true
//sharedLibrary = true
requiredVersion = '22.3'
//buildArgs("--module-path", "${buildDir}/install/ldproxy/lib")
//buildArgs("--module", application.mainModule.get())
//buildArgs("--enable-http")
//buildArgs("--install-exit-handlers")
//buildArgs("--initialize-at-run-time=org.kortforsyningen.proj")
//runtimeArgs('/src/cfgapp')
//jvmArgs.add('-Xmx16573624520')
//buildArgs('-H:Log=registerResource:3')
//buildArgs('-H:-UseServiceLoaderFeature')
//resources.autodetect()
if (project.hasProperty('STATIC')) {
// makes sense???
buildArgs('-H:+StaticExecutableWithDynamicLibC')
} else {
buildArgs('--native-compiler-options=-Wl,-framework,Security')
}
// for jackson???
//buildArgs('-H:+PrintClassInitialization')
//buildArgs("--allow-incomplete-classpath")
// for statically linking xtracfg
buildArgs("-H:CLibraryPath=${project.projectDir}/dist")
buildArgs("--add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk=ALL-UNNAMED")
buildArgs("--add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.hosted=ALL-UNNAMED")
buildArgs("--add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.hosted.c=ALL-UNNAMED")
}
toolchainDetection = false
}
if (!project.hasProperty('CI')) {
apply from: 'dev.gradle'
}