forked from Arnaud-Nauwynck/reverse-jpa-2-jhipster-jdl
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
98 lines (83 loc) · 3.04 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
apply plugin: 'application'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'pmd'
apply plugin: 'idea'
apply plugin: 'findbugs'
group = 'com.wordpress.macyves.tools'
version = '0.0.1-SNAPSHOT'
description = "jpa2jdl"
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
maven { url "http://repo.maven.apache.org/maven2" }
}
pmdMain {
reports {
xml.enabled false
html.enabled true
}
}
pmdTest {
reports {
xml.enabled false
html.enabled true
}
}
tasks.withType(FindBugs) {
reports {
xml.enabled = false
html.enabled = true
}
}
dependencies {
compile group: 'org.slf4j', name: 'slf4j-api', version:'1.7.16'
compile group: 'args4j', name: 'args4j', version:'2.33'
compile group: 'nl.javadude.scannit', name: 'scannit', version:'1.4.0'
compile group: 'org.hibernate.javax.persistence', name: 'hibernate-jpa-2.1-api', version:'1.0.0.Final'
compile group: 'org.hibernate', name: 'hibernate-validator', version:'5.2.4.Final'
runtime group: 'ch.qos.logback', name: 'logback-classic', version:'1.1.5'
compile "org.springframework.boot:spring-boot-starter-data-jpa:1.5.4.RELEASE"
compile "org.hibernate:hibernate-jcache:5.2.8.Final"
compile "org.hibernate:hibernate-envers:5.2.8.Final"
compile "com.fasterxml.jackson.core:jackson-annotations:2.8.9"
compile 'com.google.guava:guava:21.0'
compile 'org.joda:joda-money:0.12'
testCompile group: 'junit', name: 'junit', version:'4.12'
compileOnly group: 'org.projectlombok', name: 'lombok', version: '1.16.16'
}
task execute(type: JavaExec, dependsOn: 'prep') {
classpath = sourceSets.main.runtimeClasspath
main = project.hasProperty("mainClass") ? project.getProperty("mainClass") : "io.github.jhipster.jpa2jdl.ReverseJPA2JDLMain"
}
task('prep') {
doLast {
if(System.getProperty("args") != null) {
execute.enabled = true
execute.args System.getProperty("args").split()
println execute.args
} else {
println 'No args supplied.'
println 'For simple jar: gradle execute -Dargs=\"--archive /some/dir/to/archive.jar --package io.github.jhipster.jpa2jdl.example.entities\"'
println 'For executable jars: gradle execute -Dargs=\"--archive /some/dir/to/archive.jar --archiveRoot /BOOT-INF/classes/ --package io.github.jhipster.jpa2jdl.example.entities --out $(pwd)/example.jh\"'
execute.enabled = false
}
}
}
compileJava {
options.fork = false
options.encoding = 'UTF-8'
options.compilerArgs << "-Xlint:all,-processing" << "-Werror"
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
compileTestJava {
options.encoding = 'UTF-8'
}
task('javaSettings').doLast({ task ->
println "$task.project.name"
println "fork=$task.project.compileJava.options.fork"
println "encoding=$task.project.compileJava.options.encoding"
println "source=$task.project.compileJava.sourceCompatibility"
println "target=$task.project.compileJava.targetCompatibility"
})