-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
125 lines (107 loc) · 3.57 KB
/
build.gradle
File metadata and controls
125 lines (107 loc) · 3.57 KB
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
buildscript {
ext {
springBootVersion = '1.3.0.RC1'
}
repositories {
mavenLocal()
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("fr.hopelessworld.plugin:HopelessEntityAnalyzer:0.2")
classpath("fr.hopelessworld.plugin:HopelessAngularGeneratorStrategy:0.1")
}
}
apply plugin: 'java'
apply plugin: 'eclipse-wtp'
apply plugin: 'idea'
apply plugin: 'spring-boot'
apply plugin: 'war'
apply plugin: 'fr.hopelessworld.plugin.entity-analyzer'
sourceSets {
generated{
java {
srcDir "${buildDir}/generated/java/"
}
}
}
compileJava{
dependsOn(analyze)
source += sourceSets.generated.java
}
war {
baseName = 'angularGeneratorStrategySample'
version = '0.0.1-SNAPSHOT'
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
configurations {
providedRuntime
}
dependencies {
compile('org.springframework.boot:spring-boot-starter-data-jpa')
compile('org.springframework.boot:spring-boot-starter-data-rest')
compile('org.projectlombok:lombok')
compile('org.springframework.boot:spring-boot-starter-web')
runtime('com.h2database:h2')
providedRuntime('org.springframework.boot:spring-boot-starter-tomcat')
testCompile('org.springframework.boot:spring-boot-starter-test')
compile('org.apache.commons:commons-lang3:3.4')
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-starter-parent:Brixton.M1"
}
}
eclipse {
classpath {
downloadSources = true
downloadJavadoc = true
containers.remove('org.eclipse.jdt.launching.JRE_CONTAINER')
containers 'org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8'
}
wtp {
component {
resource sourcePath: '/build/generated/js', deployPath: '/WEB-INF/classes/static/js'
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.7'
}
analyzeEntity {
entityDirectory = file("/src/main/java/fr/hopelessworld/sample/entity")
strategies {
controllers {
strategyClass = "fr.hopelessworld.plugin.strategy.impl.AngularControllerStrategy"
outputFiles = file("${buildDir}/generated/js/controllers-${version}.js")
}
directives {
strategyClass = "fr.hopelessworld.plugin.strategy.impl.AngularDirectiveStrategy"
outputFiles = file("${buildDir}/generated/js/directives-${version}.js")
}
factory {
strategyClass = "fr.hopelessworld.plugin.strategy.impl.AngularFactoryStrategy"
outputFiles = file("${buildDir}/generated/js/factorys-${version}.js")
}
route {
strategyClass = "fr.hopelessworld.plugin.strategy.impl.AngularRouteStrategy"
outputFiles = file("${buildDir}/generated/js/routes-${version}.js")
}
templates {
strategyClass = "fr.hopelessworld.plugin.strategy.impl.AngularTemplateStrategy"
outputFiles = file("${buildDir}/generated/js/templates-${version}.js")
}
customRest {
strategyClass = "fr.hopelessworld.plugin.strategy.impl.AngularSpringDataRestCustomControllerStrategy"
outputFiles = file("${buildDir}/generated/java")
}
}
}