110 lines
2.2 KiB
Groovy
110 lines
2.2 KiB
Groovy
buildscript {
|
|
ext.repos = {
|
|
mavenCentral()
|
|
mavenLocal()
|
|
jcenter()
|
|
maven {
|
|
url 'https://plugins.gradle.org/m2/'
|
|
metadataSources {
|
|
artifact()
|
|
}
|
|
}
|
|
maven {
|
|
url 'https://repository.axelor.com/nexus/public/'
|
|
}
|
|
}
|
|
ext.openPlatformVersion = '5.2.2'
|
|
ext.appVersion = '5.2.1'
|
|
repositories repos
|
|
dependencies {
|
|
classpath "com.axelor:axelor-gradle:${openPlatformVersion}"
|
|
}
|
|
}
|
|
|
|
allprojects { repositories repos }
|
|
|
|
apply plugin: 'idea'
|
|
apply plugin: 'eclipse'
|
|
apply plugin: "com.axelor.app"
|
|
|
|
apply from: './gradle/style.gradle'
|
|
|
|
allprojects {
|
|
|
|
configurations {
|
|
runtime.exclude group:"org.eclipse.birt.runtime.3_7_1", module:"org.apache.commons.codec"
|
|
}
|
|
|
|
apply plugin: 'idea'
|
|
apply plugin: 'eclipse'
|
|
|
|
group = "com.axelor"
|
|
version = "${appVersion}"
|
|
|
|
sourceCompatibility = 1.8
|
|
targetCompatibility = 1.8
|
|
|
|
}
|
|
|
|
subprojects {
|
|
group = "com.axelor.apps"
|
|
}
|
|
|
|
axelor {
|
|
title "Sophal"
|
|
description "Sophal Entreprise"
|
|
}
|
|
|
|
dependencies {
|
|
gradle.appModules.each { dir ->
|
|
compile project(":modules:$dir.name")
|
|
}
|
|
}
|
|
|
|
wrapper {
|
|
gradleVersion = "4.5.1"
|
|
}
|
|
|
|
task("dataImport", type: JavaExec) {
|
|
main = "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()
|
|
}
|
|
}
|
|
}
|
|
|
|
classifier 'reports'
|
|
includeEmptyDirs = false
|
|
destinationDir = file("$buildDir/libs")
|
|
}
|
|
|
|
war {
|
|
destinationDir = file("C:/apache-tomcat-8.5.0/webapps")
|
|
archiveName = "sophal2.war"
|
|
}
|
|
|
|
task stopTomcat(type: Exec) {
|
|
dependsOn stopTomcat
|
|
workingDir 'C:/apache-tomcat-8.5.0/bin'
|
|
commandLine 'cmd', '/c', 'shutdown.bat'
|
|
}
|
|
|
|
task startTomcat(type: Exec) {
|
|
dependsOn war
|
|
workingDir 'C:/apache-tomcat-8.5.0/bin'
|
|
commandLine 'cmd', '/c', 'startup.bat'
|
|
// commandLine 'cmd', '/c', 'start', '/b', 'startup.bat'
|
|
}
|
|
|
|
|
|
build.finalizedBy archiveReports
|