-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
80 lines (66 loc) · 1.81 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
/*
* Copyright (c) 2017 Duna Open Source Project
* Ministério do Planejamento, Desenvolvimento de Gestão
* República Federativa do Brasil
*
* This file is part of the Duna Project.
*/
plugins {
id "com.jfrog.bintray" version "1.7.3"
}
apply from: 'gradle/versions.gradle'
configure (allprojects) {
apply plugin: 'idea'
apply plugin: 'eclipse'
group 'io.duna'
version '0.4.5.1'
repositories {
mavenLocal()
jcenter()
}
}
configure (subprojects) {
apply plugin: 'java'
// apply plugin: 'checkstyle'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven-publish'
apply from: file("$rootDir/gradle/publishing.gradle")
sourceCompatibility = 1.8
targetCompatibility = 1.8
// afterEvaluate {
// tasks.findByName('check').dependsOn('checkstyleMain')
// }
// checkstyle {
// //noinspection GroovyAssignabilityCheck
// configFile rootProject.file('config/checkstyle/duna.xml')
// configProperties = [
// checkstyleDir: "${rootDir}/config/checkstyle",
// projectDir: rootDir
// ]
// ignoreFailures = false
// showViolations = true
// toolVersion = "7.3"
// }
//
// tasks.withType(Checkstyle) {
// reports {
// xml.enabled false
// html.enabled true
// html.stylesheet resources.text.fromFile("${rootDir}/config/checkstyle/format.xsl")
// }
// }
}
gradle.beforeProject {
assertCorrectGradleVersion()
}
def assertCorrectGradleVersion() {
def major = gradle.gradleVersion.split('\\.')[0].toInteger()
def minor = gradle.gradleVersion.split('\\.')[1].toInteger()
if (major < 3) {
throw new ConfigurationCycleException(
"Gradle 3.1 or greater required to build this project.")
} else if (major == 3 && minor < 1) {
throw new ConfigurationCycleException(
"Gradle 3.1 or greater required to build this project.")
}
}