diff options
Diffstat (limited to 'build.gradle')
-rw-r--r-- | build.gradle | 68 |
1 files changed, 46 insertions, 22 deletions
diff --git a/build.gradle b/build.gradle index 1a66499..600a966 100644 --- a/build.gradle +++ b/build.gradle @@ -1,35 +1,59 @@ +plugins { + id 'java' + id "org.javamodularity.moduleplugin" version "1.6.0" +} + group 'org.glavo' -version '0.1.1' +version '0.2' + +modularity.mixedJavaRelease 8 -apply plugin: 'java' +jar { + manifest.attributes( + 'Implementation-Version': '1.2', + 'Main-Class': 'org.glavo.javah.Main', + "GJavah-Version": project.version + ) +} -sourceCompatibility = 1.8 -targetCompatibility = 1.8 +tasks.withType(JavaCompile) { + options.encoding = 'UTF-8' +} + +compileTestJava { + moduleOptions { + addModules = [ + 'org.junit.jupiter.api' + ] + addReads = [ + 'org.glavo.javah': 'org.junit.jupiter.api' + ] + } +} + +test { + testLogging.showStandardStreams = true + useJUnitPlatform() + moduleOptions { + runOnClasspath = true + } +} repositories { mavenCentral() } dependencies { - compile group: 'org.ow2.asm', name: 'asm', version: '6.1.1' + // https://mvnrepository.com/artifact/commons-cli/commons-cli + implementation group: 'info.picocli', name: 'picocli', version: '4.1.1' - testCompile group: 'junit', name: 'junit', version: '4.12' -} + // https://mvnrepository.com/artifact/org.ow2.asm/asm + implementation group: 'org.ow2.asm', name: 'asm', version: '7.2' -jar { - manifest { - attributes 'Implementation-Version': '1.2', - 'Main-Class': 'org.glavo.javah.HeaderGenerator' - } + testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: '5.5.2' } -task fatJar(type: Jar) { - baseName = project.name + '-all' - description = 'Assembles a jar archive containing the main classes and all the dependencies.' - from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } - manifest { - attributes 'Implementation-Version': '1.2', - 'Main-Class': 'org.glavo.javah.HeaderGenerator' - } - with jar -}
\ No newline at end of file +task copyDependencies(type: Copy) { + from configurations.default + into 'build/libs' +} |