mirror of
https://gitlab.com/annimon/imagetagger.git
synced 2024-09-20 05:44:20 +03:00
59 lines
1.8 KiB
Groovy
59 lines
1.8 KiB
Groovy
buildscript {
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
dependencies {
|
|
classpath 'net.sf.proguard:proguard-gradle:6.2.2'
|
|
}
|
|
}
|
|
|
|
plugins {
|
|
id 'java'
|
|
id 'application'
|
|
id "com.github.johnrengelman.shadow" version "5.2.0"
|
|
}
|
|
|
|
group 'com.annimon'
|
|
version '1.0-SNAPSHOT'
|
|
mainClassName = 'com.annimon.imagetagger.Main'
|
|
def archiveName = "${rootProject.name}"
|
|
def shadowFileName = "$archiveName-all.jar"
|
|
def proguardFileName = "$archiveName-proguard.jar"
|
|
|
|
shadowJar {
|
|
mergeServiceFiles()
|
|
archiveFileName = shadowFileName
|
|
}
|
|
|
|
task proguard(dependsOn: shadowJar, type: proguard.gradle.ProGuardTask) {
|
|
configuration "$rootProject.projectDir/proguard.pro"
|
|
injars "${file(jar.destinationDirectory)}/$shadowFileName"
|
|
outjars "${file(jar.destinationDirectory)}/$proguardFileName"
|
|
|
|
// Automatically handle the Java version of this build.
|
|
if (System.getProperty('java.version').startsWith('1.')) {
|
|
// Before Java 9, the runtime classes were packaged in a single jar file.
|
|
libraryjars "${System.getProperty('java.home')}/lib/rt.jar"
|
|
} else {
|
|
// As of Java 9, the runtime classes are packaged in modular jmod files.
|
|
def jmods = files { file("${System.getProperty('java.home')}/jmods").listFiles() }
|
|
jmods.each {
|
|
libraryjars it, jarfilter: '!**.jar', filter: '!module-info.class'
|
|
}
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
ext.jacksonVersion = '2.12.0'
|
|
|
|
dependencies {
|
|
implementation "com.fasterxml.jackson.core:jackson-core:$jacksonVersion"
|
|
implementation "com.fasterxml.jackson.core:jackson-annotations:$jacksonVersion"
|
|
implementation "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion"
|
|
implementation 'com.github.ben-manes.caffeine:caffeine:2.8.8'
|
|
testImplementation 'junit:junit:4.13.1'
|
|
}
|