-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
112 lines (94 loc) · 2.38 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
// SETUP BUILDSCRIPT ///////////////////////////////////////////////////////////
buildscript {
repositories {
jcenter()
maven {
url 'https://plugins.gradle.org/m2/'
}
}
dependencies {
classpath 'org.xtext:xtext-gradle-plugin:1.0.19'
classpath 'com.netflix.nebula:gradle-extra-configurations-plugin:3.0.3'
}
}
task wrapper(type: Wrapper) {
gradleVersion = '4.0'
}
// CONFIGURE PROJECTS ///////////////////////////////////////////////////
subprojects {
apply plugin: 'eclipse'
apply plugin: 'java'
apply plugin: 'org.xtext.xtend'
apply plugin: 'maven-publish'
apply plugin: 'jacoco'
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
eclipse.project.name = rootProject.name + '-' + project.name
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
compile "org.eclipse.xtend:org.eclipse.xtend.lib:${xtendVersion}"
compile "org.slf4j:slf4j-api:${slf4jVersion}"
testCompile "ch.qos.logback:logback-classic:${logbackVersion}"
testCompile "junit:junit:${junitVersion}"
}
task sourcesJar( type: Jar, dependsOn: classes ) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar( type: Jar, dependsOn: javadoc ) {
classifier = 'javadoc'
from javadoc.destinationDir
}
tasks.withType( Javadoc ) {
if ( JavaVersion.current().isJava8Compatible() ) {
options.addStringOption( 'Xdoclint:none', '-quiet' )
}
}
task install( dependsOn: publishToMavenLocal )
jacoco {
toolVersion = '0.7.6.201602180812'
}
jacocoTestReport {
group = "Reporting"
description = "Generate Jacoco coverage reports after running tests."
reports.html.enabled true
}
publishing {
publications {
mavenJava( MavenPublication ) {
artifactId rootProject.name + '-' + project.name
from components.java
artifact sourcesJar
artifact javadocJar
pom.withXml {
asNode().dependencies.'*'.each() {
it.scope*.value = 'compile'
}
}
}
}
}
}
project( 'annotations' ) {
dependencies {
}
}
project( 'annotations-test' ) {
dependencies {
compile project(":annotations")
}
}
project( 'core' ) {
dependencies {
compile project(":annotations")
}
}
project( 'test' ) {
dependencies {
compile project( ':core' )
compile "junit:junit:${junitVersion}"
}
}