Created
May 25, 2017 03:01
-
-
Save dmikurube/98d895f81c47dfc72b8d7aeeb578f2c5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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' | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
testCompile 'junit:junit:4.+' | |
} | |
sourceSets { | |
main { | |
java { | |
srcDir '.' | |
exclude 'Test*.java' | |
} | |
} | |
test { | |
java { | |
srcDir '.' | |
include 'Test*.java' | |
} | |
} | |
} | |
test { | |
testLogging { | |
events 'passed', 'skipped', 'failed', 'standardOut', 'standardError' | |
} | |
} | |
task run(type:JavaExec) { | |
main = project.hasProperty('main') ? project.getProperty('main') : 'TryOneJar' | |
classpath = sourceSets.main.runtimeClasspath | |
} |
This file contains hidden or 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
public class TryOneJar { | |
public static void main(String[] args) { | |
System.out.println("One-JAR"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment