-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
129 lines (106 loc) · 3.34 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
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
126
127
/*
* Copyright (C) 2018 Knot.x Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
plugins {
id 'io.spring.dependency-management' version '1.0.5.RELEASE' apply false
id 'maven'
}
allprojects {
repositories {
mavenLocal()
jcenter()
maven { url 'https://plugins.gradle.org/m2/' }
maven { url "https://oss.sonatype.org/content/groups/staging/" }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}
}
defaultTasks = ['build']
subprojects { subproject ->
group = 'io.knotx'
apply plugin: 'java-library'
apply plugin: 'io.spring.dependency-management'
sourceCompatibility = 1.8
targetCompatibility = 1.8
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
options.compilerArgs << '-Xlint:deprecation'
options.incremental = true
}
dependencyManagement {
imports {
mavenBom "io.knotx:knotx-dependencies:${project.version}"
}
}
dependencies {
compile 'io.knotx:knotx-core'
compile 'io.vertx:vertx-core'
compile 'io.vertx:vertx-service-proxy'
compile 'io.vertx:vertx-rx-java2'
compileOnly 'io.vertx:vertx-codegen'
// Test dependencies
testCompile 'io.knotx:knotx-core'
testCompile 'io.knotx:knotx-junit5'
testCompile 'org.junit.jupiter:junit-jupiter-api'
testCompile 'org.junit.jupiter:junit-jupiter-engine'
testCompile 'org.junit.jupiter:junit-jupiter-params'
testCompile 'org.junit.jupiter:junit-jupiter-migrationsupport'
testCompile 'org.junit.vintage:junit-vintage-engine'
testCompile 'uk.co.datumedge:hamcrest-json'
testCompile 'org.hamcrest:hamcrest-all'
testCompile 'com.github.tomakehurst:wiremock'
}
sourceSets {
main {
java {
srcDirs += 'src/main/generated'
}
}
test {
resources {
srcDirs += 'src/test/resources'
}
}
}
clean.doFirst {
file('src/main/generated').deleteDir()
}
task annotationProcessing(type: JavaCompile, group: 'build') { // codegen
source = sourceSets.main.java
classpath = configurations.compile + configurations.compileOnly
destinationDir = project.file('src/main/generated')
options.compilerArgs = [
"-proc:only",
"-processor", "io.vertx.codegen.CodeGenProcessor",
"-Acodegen.output=${destinationDir.absolutePath}"
]
}
task annotationProcessingCleanup() {
doLast {
delete "${project.projectDir}/src/main/generated"
println "Removing: ${project.projectDir}/src/main/generated"
}
}
annotationProcessing.dependsOn annotationProcessingCleanup
test {
useJUnitPlatform()
include 'io/knotx/forms/**'
systemProperties = [
'vertx.logger-delegate-factory-class-name': 'io.vertx.core.logging.SLF4JLogDelegateFactory'
]
}
if (subproject.name != 'knotx-forms-it-test') {
apply from: "${rootProject.projectDir}/release.gradle"
}
}