forked from axelor/open-suite-webapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
148 lines (125 loc) · 3.93 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
import com.axelor.gradle.tasks.CheckCredentialsInRptdesign
import com.axelor.gradle.tasks.CheckXmlDomainsAttributes
import com.axelor.gradle.tasks.CheckXmlImportsAttributes
import com.axelor.gradle.tasks.CheckXmlViewsAttributes
import com.axelor.gradle.tasks.GenerateAosChangelog
import com.axelor.gradle.tasks.CheckEOLCharsInCsv
plugins {
id 'com.axelor.app'
}
axelor {
title "Axelor ERP"
description "Axelor Entreprise Application"
}
allprojects {
apply plugin: 'idea'
apply plugin: 'eclipse'
group = 'com.axelor.apps'
version = '8.2.3'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
}
afterEvaluate {
test {
useJUnitPlatform()
beforeTest { descriptor ->
logger.lifecycle('Running: ' + descriptor)
}
}
}
configurations {
runtimeClasspath.exclude group: "org.eclipse.birt.runtime.3_7_1", module: "org.apache.commons.codec"
runtimeClasspath.exclude group: "org.eclipse.birt.runtime.3_7_1", module: "com.lowagie.text"
}
}
tasks.withType(PublishToMavenRepository).configureEach { it.enabled = false }
dependencies {
gradle.appModules.each { dir ->
implementation project(":modules:$dir.name")
}
}
apply from: 'gradle/style.gradle'
task("dataImport", type: JavaExec) {
mainClass = "com.axelor.apps.erp.Main"
classpath = sourceSets.main.runtimeClasspath
if (System.getProperty("exec.args") != null) {
args System.getProperty("exec.args").split()
}
}
task archiveReports(type: Zip) {
file("modules").traverse(type: groovy.io.FileType.DIRECTORIES, maxDepth: 1) { dir ->
if (new File(dir, "build.gradle").exists() && new File(dir, "/src/main/resources/reports").exists()) {
new File(dir, "/src/main/resources/reports/").listFiles().each { report ->
from report.getPath()
}
}
}
archiveClassifier = 'reports'
includeEmptyDirs = false
destinationDirectory = file("$buildDir/libs")
}
task generateChangelog(type: GenerateAosChangelog) {
group "Axelor application"
description "Generate change logs from unreleased entries."
files = fileTree(projectDir) {
include '**/changelogs/**/*.yml'
include '**/changelogs/**/*.yaml'
}
}
task checkCsvEOL(type: CheckEOLCharsInCsv) {
group "Axelor application"
description "Generate change logs from unreleased entries."
files = fileTree(projectDir) {
exclude '**/build'
exclude '**/bin'
exclude '**/out'
include '**/*.csv'
}
}
task checkBirtCredentials(type: CheckCredentialsInRptdesign) {
group "Axelor application"
description "Generate change logs from unreleased entries."
files = fileTree(projectDir) {
exclude '**/build'
exclude '**/bin'
exclude '**/out'
include '**/*.rptdesign'
}
}
task checkXmlDomainsAttributes(type: CheckXmlDomainsAttributes) {
group "Axelor application"
description "Verify errors in XML domain files."
files = fileTree(projectDir) {
exclude '**/build'
exclude '**/bin'
exclude '**/out'
include '**/modules/**/src/main/resources/domains/*.xml'
}
}
task checkXmlViewsAttributes(type: CheckXmlViewsAttributes) {
group "Axelor application"
description "Verify errors in XML view files."
files = fileTree(projectDir) {
exclude '**/build'
exclude '**/bin'
exclude '**/out'
include '**/modules/**/src/main/resources/views/*.xml'
}
}
task checkXmlImportsAttributes(type: CheckXmlImportsAttributes) {
group "Axelor application"
description "Verify errors in XML import files."
files = fileTree(projectDir) {
exclude '**/build'
exclude '**/bin'
exclude '**/out'
include "**/modules/**/src/main/resources/apps/**/*.xml"
include "**/modules/**/src/main/resources/data-import/*.xml"
include "**/modules/**/src/main/resources/data-init/*.xml"
include '**/modules/**/src/main/resources/import-configs/*.xml'
}
}
task checkXml(dependsOn: ['checkXmlDomainsAttributes','checkXmlViewsAttributes', 'checkXmlImportsAttributes'])
build.finalizedBy archiveReports