-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
48 lines (40 loc) · 1.29 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
plugins {
id 'java'
id 'application'
}
tasks.withType(JavaCompile).configureEach {
//options.release = 23
}
ext.moduleName = 'org.bitcoinj.secp.examples'
dependencies {
implementation project(':secp-api')
runtimeOnly project(':secp-bouncy')
runtimeOnly project(':secp-ffm')
}
jar {
inputs.property("moduleName", moduleName)
manifest {
attributes 'Implementation-Title': 'Example secp256k1-jdk Apps',
'Implementation-Version': archiveVersion.get()
}
}
application {
mainModule = 'org.bitcoinj.secp.examples'
mainClass = 'org.bitcoinj.secp.examples.Schnorr'
}
def userHome = System.getProperty("user.home")
def javaLibraryPath = findProperty("javaPath") ?: "${userHome}/.nix-profile/lib"
run {
systemProperty "java.library.path", javaLibraryPath
jvmArgs += '--enable-native-access=org.bitcoinj.secp.ffm'
}
tasks.register('runEcdsa', JavaExec) {
javaLauncher = javaToolchains.launcherFor {
languageVersion = JavaLanguageVersion.of(javaToolchainVersion)
}
systemProperty "java.library.path", javaLibraryPath
classpath = sourceSets.main.runtimeClasspath
mainModule = 'org.bitcoinj.secp.examples'
mainClass = 'org.bitcoinj.secp.examples.Ecdsa'
jvmArgs += '--enable-native-access=org.bitcoinj.secp.ffm'
}