-
-
Save TheBoegl/695eaa6837764bcfb08137a48d873c60 to your computer and use it in GitHub Desktop.
Fix for https://github.com/UnAfraid/Launch4jPlusSLF4j and https://github.com/TheBoegl/gradle-launch4j/issues/40
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'java' | |
apply plugin: 'eclipse' | |
apply plugin: 'edu.sc.seis.launch4j' | |
apply plugin: "de.sebastianboegl.shadow.transformer.log4j" | |
sourceCompatibility = '1.8' | |
targetCompatibility = '1.8' | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
compile(group: 'org.slf4j', name: 'slf4j-api', version: '1.7.22') | |
compile(group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: '2.7') | |
compile(group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.7') | |
} | |
eclipse { | |
project { | |
natures('org.springsource.ide.eclipse.gradle.core.nature') | |
} | |
} | |
task wrapper(type: Wrapper) { | |
gradleVersion = '3.0' | |
} | |
tasks.withType(JavaCompile) { | |
options.encoding = 'UTF-8' | |
} | |
def generalManifest = manifest { | |
attributes( | |
'Built-By': System.getProperty('user.name'), | |
'Implementation-URL': 'https://github.com/UnAfraid/Launch4jPlusSLF4j', | |
'Main-Class': 'com.github.unafraid.editor.ui.Main', | |
) | |
} | |
jar { | |
manifest { | |
from(generalManifest) | |
} | |
} | |
launch4j { | |
copyConfigurable = project.tasks.shadowJar.outputs.files | |
jar = "lib/${project.tasks.shadowJar.archiveName}" | |
mainClassName = "com.github.unafraid.editor.ui.Main" | |
} | |
buildscript { | |
repositories { | |
maven { | |
url 'https://plugins.gradle.org/m2/' | |
} | |
mavenLocal() | |
} | |
dependencies { | |
classpath 'gradle.plugin.edu.sc.seis.gradle:launch4j:2.1.0' | |
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.4' | |
classpath "de.sebastianboegl.gradle.plugins:shadow-log4j-transformer:1.0.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment