java rewrite
This commit is contained in:
50
jpacrepo-client/build.gradle
Normal file
50
jpacrepo-client/build.gradle
Normal file
@@ -0,0 +1,50 @@
|
||||
plugins {
|
||||
id 'java-library'
|
||||
id "net.woggioni.gradle.envelope"
|
||||
}
|
||||
|
||||
import net.woggioni.gradle.envelope.EnvelopeJarTask
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation group: 'org.slf4j', name: 'slf4j-api', version: getProperty('slf4j.version')
|
||||
implementation group: 'org.apache.logging.log4j',
|
||||
name: 'log4j-slf4j-impl',
|
||||
version: getProperty('log4j.version')
|
||||
|
||||
implementation project(':jpacrepo-api')
|
||||
runtimeOnly group: 'org.jboss',
|
||||
name: 'jboss-ejb-client', version: getProperty('jboss.ejb.client.version')
|
||||
|
||||
}
|
||||
|
||||
java {
|
||||
modularity.inferModulePath = true
|
||||
}
|
||||
|
||||
tasks.named(JavaPlugin.COMPILE_JAVA_TASK_NAME, JavaCompile) { JavaCompile j ->
|
||||
options.javaModuleMainClass = 'net.woggioni.jpacrepo.client.Main'
|
||||
// options.compilerArgs += [
|
||||
// '--add-reads', 'javax.ejb=ALL-UNNAMED'
|
||||
// ]
|
||||
}
|
||||
|
||||
Provider<EnvelopeJarTask> envelopeJarTaskProvider = tasks.named('envelopeJar', EnvelopeJarTask.class) {
|
||||
mainClass = 'net.woggioni.jpacrepo.client.Main'
|
||||
}
|
||||
|
||||
tasks.register('run', JavaExec) { JavaExec t ->
|
||||
classpath(project.sourceSets.main.output.dirs)
|
||||
classpath(project.sourceSets.main.runtimeClasspath)
|
||||
mainModule = 'net.woggioni.jpacrepo.client'
|
||||
mainClass = 'net.woggioni.jpacrepo.client.Main'
|
||||
// String modulePath = project.sourceSets.main.runtimeClasspath.files.stream()
|
||||
// .map(File::toString)
|
||||
// .collect(Collectors.joining(System.getProperty('path.separator')))
|
||||
|
||||
// jvmArgs = [
|
||||
// '--add-reads', 'net.woggioni.jpacrepo.client=ALL-UNNAMED',
|
||||
// '--module-path', modulePath
|
||||
// ]
|
||||
modularity.inferModulePath = true
|
||||
}
|
Reference in New Issue
Block a user