71 lines
2.0 KiB
Groovy
71 lines
2.0 KiB
Groovy
plugins {
|
|
id 'java'
|
|
}
|
|
|
|
group 'epub.jgourour' // Replace with your group ID
|
|
version '0.1-SNAPSHOT' // Replace with your version
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
implementation 'info.picocli:picocli:4.7.6'
|
|
implementation 'net.java.dev.jna:jna-platform:5.17.0'
|
|
|
|
testImplementation platform('org.junit:junit-bom:5.10.0')
|
|
testImplementation ('org.junit.jupiter:junit-jupiter')
|
|
testImplementation ('org.bouncycastle:bcprov-jdk18on:1.82')
|
|
testImplementation ( 'org.bouncycastle:bcpkix-jdk18on:1.82')
|
|
testImplementation ( 'org.bouncycastle:bcutil-jdk18on:1.82')
|
|
}
|
|
|
|
jar.enabled = false
|
|
|
|
sourceSets {
|
|
libraries {
|
|
compileClasspath += sourceSets.main.output + sourceSets.test.output // Add dependencies from main and test source sets
|
|
runtimeClasspath += sourceSets.main.output + sourceSets.test.output // Add dependencies from main and test source sets
|
|
java {
|
|
srcDirs = ['src/main/java'] // Define the source directories for Java files\,
|
|
include("*")
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks.register('EncryptEPub', Jar) {
|
|
archiveFileName = 'EncryptEPub.jar'
|
|
manifest {
|
|
attributes 'Main-Class': 'EncryptEPub' // Replace with your main class
|
|
}
|
|
from {sourceSets.main.output.classesDirs}
|
|
dependsOn configurations.runtimeClasspath
|
|
from {
|
|
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
|
|
}
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE // Or INCLUDE, EXCLUDE, WARN, INHERIT
|
|
}
|
|
|
|
tasks.register('AdeptActivateCli', Jar ) {
|
|
archiveFileName = 'AdeptActivateCli.jar'
|
|
manifest {
|
|
attributes( 'Main-Class' : 'AdeptActivateCli')
|
|
}
|
|
from {sourceSets.main.output.classesDirs}
|
|
dependsOn configurations.runtimeClasspath
|
|
from {
|
|
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
|
|
}
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE // Or INCLUDE, EXCLUDE, WARN, INHERIT
|
|
|
|
}
|
|
jar.enabled = false
|
|
|
|
artifacts {
|
|
archives EncryptEPub, AdeptActivateCli
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
}
|