mirror of
https://github.com/sparrowwallet/drongo.git
synced 2024-11-02 18:26:43 +00:00
119 lines
3.1 KiB
Groovy
119 lines
3.1 KiB
Groovy
buildscript {
|
|
repositories {
|
|
maven {
|
|
url "https://plugins.gradle.org/m2/"
|
|
}
|
|
}
|
|
}
|
|
|
|
plugins {
|
|
id 'java-library'
|
|
id 'extra-java-module-info'
|
|
id 'com.github.johnrengelman.shadow' version '5.2.0'
|
|
}
|
|
|
|
tasks.withType(AbstractArchiveTask) {
|
|
preserveFileTimestamps = false
|
|
reproducibleFileOrder = true
|
|
}
|
|
|
|
group 'com.sparrowwallet'
|
|
version '1.0'
|
|
|
|
def os = org.gradle.internal.os.OperatingSystem.current()
|
|
def osName = os.getFamilyName()
|
|
if(os.macOsX) {
|
|
osName = "osx"
|
|
}
|
|
|
|
sourceCompatibility = 16
|
|
targetCompatibility = 16
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
implementation ('org.zeromq:jeromq:0.5.0') {
|
|
exclude group: 'org.hamcrest', module: 'hamcrest-core'
|
|
}
|
|
implementation ('com.googlecode.json-simple:json-simple:1.1.1') {
|
|
exclude group: 'org.hamcrest', module: 'hamcrest-core'
|
|
exclude group: 'junit', module: 'junit'
|
|
}
|
|
implementation ('org.bouncycastle:bcprov-jdk15on:1.64') {
|
|
exclude group: 'org.hamcrest', module: 'hamcrest-core'
|
|
}
|
|
implementation ('de.mkammerer:argon2-jvm:2.11') {
|
|
exclude group: 'org.hamcrest', module: 'hamcrest-core'
|
|
exclude group: 'junit', module: 'junit'
|
|
exclude group: 'net.java.dev.jna', module: 'jna'
|
|
}
|
|
implementation ('net.java.dev.jna:jna:5.8.0')
|
|
implementation ('ch.qos.logback:logback-classic:1.2.8') {
|
|
exclude group: 'org.hamcrest', module: 'hamcrest-core'
|
|
exclude group: 'org.slf4j'
|
|
}
|
|
implementation ('org.slf4j:slf4j-api:1.7.30')
|
|
testImplementation ('junit:junit:4.12') {
|
|
exclude group: 'org.hamcrest', module: 'hamcrest-core'
|
|
}
|
|
testImplementation group: 'org.hamcrest', name: 'hamcrest-core', version: '2.2'
|
|
}
|
|
|
|
processResources {
|
|
doLast {
|
|
delete fileTree("$buildDir/resources/main/native").matching {
|
|
exclude "${osName}/**"
|
|
}
|
|
}
|
|
}
|
|
|
|
task(runDrongo, dependsOn: 'classes', type: JavaExec) {
|
|
mainClass = 'com.sparrowwallet.drongo.Main'
|
|
classpath = sourceSets.main.runtimeClasspath
|
|
args 'drongo.properties'
|
|
}
|
|
|
|
jar {
|
|
manifest {
|
|
attributes "Main-Class": "com.sparrowwallet.drongo.Main"
|
|
}
|
|
|
|
exclude('logback.xml')
|
|
|
|
archiveBaseName = 'drongo'
|
|
archiveVersion = '0.9'
|
|
}
|
|
|
|
shadowJar {
|
|
archiveVersion = '0.9'
|
|
classifier = 'all'
|
|
}
|
|
|
|
extraJavaModuleInfo {
|
|
module('logback-core-1.2.8.jar', 'logback.core', '1.2.8') {
|
|
exports('ch.qos.logback.core')
|
|
exports('ch.qos.logback.core.spi')
|
|
requires('java.xml')
|
|
}
|
|
module('logback-classic-1.2.8.jar', 'logback.classic', '1.2.8') {
|
|
exports('ch.qos.logback.classic')
|
|
exports('ch.qos.logback.classic.spi')
|
|
requires('org.slf4j')
|
|
requires('logback.core')
|
|
requires('java.xml')
|
|
requires('java.logging')
|
|
}
|
|
module('jeromq-0.5.0.jar', 'jeromq', '0.5.0') {
|
|
exports('org.zeromq')
|
|
}
|
|
module('json-simple-1.1.1.jar', 'json.simple', '1.1.1') {
|
|
exports('org.json.simple')
|
|
exports('org.json.simple.parser')
|
|
}
|
|
module('jnacl-1.0.0.jar', 'eu.neilalexander.jnacl', '1.0.0')
|
|
module('junit-4.12.jar', 'junit', '4.12') {
|
|
exports('org.junit')
|
|
}
|
|
}
|