-
Notifications
You must be signed in to change notification settings - Fork 444
/
build.gradle
128 lines (112 loc) · 3.89 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
128
buildscript {
ext.kotlin_version = '1.4.0'
repositories {
mavenCentral()
jcenter()
}
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
plugins {
id 'com.github.kt3k.coveralls' version '2.8.4'
}
allprojects {
apply plugin: 'idea'
apply plugin: 'jacoco'
repositories {
mavenLocal()
mavenCentral()
}
}
subprojects {
group = 'org.cf'
ext {
depends = [
commons_lang : 'org.apache.commons:commons-lang3:3.10',
commons_cli : 'commons-cli:commons-cli:1.4',
findbugs : 'com.google.code.findbugs:jsr305:3.0.1',
guava : 'com.google.guava:guava:28.2-jre',
junit_compile : 'org.junit.jupiter:junit-jupiter-api:5.7.0',
junit_engine : 'org.junit.jupiter:junit-jupiter-engine:5.7.0',
junit_runner : 'org.junit.platform:junit-platform-runner:1.7.0',
mockito : 'org.mockito:mockito-junit-jupiter:3.6.0',
perfidix : 'org.perfidix:perfidix:3.6.9',
proguard_gradle: 'net.sf.proguard:proguard-gradle:6.2.2',
slf4j_api : 'org.slf4j:slf4j-api:1.7.30',
slf4j_nop : 'org.slf4j:slf4j-nop:1.7.30',
trove4j : 'net.sf.trove4j:trove4j:3.0.3',
]
}
if (project.name == 'simplify' || project.name == 'demoapp') {
apply plugin: 'java'
apply plugin: 'application'
} else if (project.name == 'smalivm') {
apply plugin: 'java-library'
version = '1.3.0'
} else {
apply plugin: 'org.jetbrains.kotlin.jvm'
apply plugin: 'application'
}
if (project.name != 'demoapp' && project.name != 'sdbg') {
jacocoTestReport {
reports {
html.enabled = true
xml.enabled = true
csv.enabled = false
}
}
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
test {
useJUnitPlatform()
}
tasks.withType(JavaCompile) {
options.fork = true
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
//options.incremental = false
}
if (project.name == 'simplify') {
tasks.withType(Test) {
maxParallelForks = 2
minHeapSize = '128m'
maxHeapSize = '4g'
jvmArgs = ['-XX:-UseGCOverheadLimit']
}
} else {
tasks.withType(Test) {
maxParallelForks = Runtime.runtime.availableProcessors()
if (System.env.TRAVIS == 'true') {
testLogging {
// Print out test status to make it easier to debug problematic builds.
events "started", "passed", "skipped", "failed"
}
}
}
}
}
// These aren't intended to have tests and shouldn't count against code coverage
def reportProjects = (subprojects - project(':demoapp') - project(':sdbg'))
task jacocoRootReport(type: JacocoReport, group: 'Coverage reports') {
description = 'Generates an aggregate report from all subprojects'
dependsOn(reportProjects.test)
sourceDirectories.from = reportProjects.sourceSets.main.allJava.srcDirs
//additionalSourceDirs.from = reportProjects.sourceSets.main.allJava.srcDirs
classDirectories.from = reportProjects.sourceSets.main.output.classesDirs
executionData.from = reportProjects.jacocoTestReport.executionData
reports {
html.enabled = true
xml.enabled = true
csv.enabled = false
}
}
coveralls {
sourceDirs = reportProjects.sourceSets.main.allJava.srcDirs.flatten()
jacocoReportPath = "${buildDir}/reports/jacoco/jacocoRootReport/jacocoRootReport.xml"
}