drongo/build.gradle
2022-01-09 11:05:17 +02:00

117 lines
3 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.7') {
exclude group: 'org.hamcrest', module: 'hamcrest-core'
exclude group: 'junit', module: 'junit'
}
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')
}
}