diff --git a/build.gradle b/build.gradle index fa563b6..d070c22 100644 --- a/build.gradle +++ b/build.gradle @@ -13,9 +13,10 @@ repositories { } dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" - runtime group: 'org.jetbrains.kotlin', name: 'kotlin-reflect', version: '1.3.61' + compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8" + compile group: 'org.jetbrains.kotlin', name: 'kotlin-reflect', version: '1.3.61' testCompile group: 'junit', name: 'junit', version: '4.12' + compile group: 'org.pf4j', name: 'pf4j', version: '3.2.0' } compileKotlin { @@ -23,4 +24,23 @@ compileKotlin { } compileTestKotlin { kotlinOptions.jvmTarget = "1.8" +} + +jar { + zip64 true + manifest { + attributes 'Main-Class': 'io.smnp.SMNPKt' + } + + // This line of code recursively collects and copies all of a project's files + // and adds them to the JAR itself. One can extend this task, to skip certain + // files or particular types at will + from configurations.compile.collect { + exclude "META-INF/*.SF" + exclude "META-INF/*.DSA" + exclude "META-INF/*.RSA" + it.isDirectory() ? it : zipTree(it) + } + from files(sourceSets.main.output.classesDirs) + from files(sourceSets.main.resources) } \ No newline at end of file