| /******************************************************************************** |
| * Copyright (c) 2015-2018 Contributors to the Eclipse Foundation |
| * |
| * See the NOTICE file(s) distributed with this work for additional |
| * information regarding copyright ownership. |
| * |
| * This program and the accompanying materials are made available under the |
| * terms of the Eclipse Public License v. 2.0 which is available at |
| * http://www.eclipse.org/legal/epl-2.0. |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| ********************************************************************************/ |
| |
| group = 'org.eclipse.mdm' |
| version = '5.1.0M3' |
| |
| description = 'mdm nucleus' |
| apply plugin: 'war' |
| apply plugin: 'maven' |
| apply plugin: 'eclipse' |
| apply plugin: 'jacoco' |
| apply plugin: 'org.sonarqube' |
| |
| sourceCompatibility = 1.8 |
| |
| repositories { |
| mavenLocal() |
| mavenCentral() |
| } |
| |
| subprojects { |
| configurations.all { |
| resolutionStrategy.dependencySubstitution { |
| substitute module("de.rechner:openatfx") with project(":org.eclipse.mdm.openatfx") |
| } |
| } |
| |
| group = rootProject.group |
| version = rootProject.version |
| |
| apply plugin: 'eclipse' |
| apply plugin: 'java' |
| apply plugin: 'maven' |
| apply plugin: 'jacoco' |
| |
| sourceCompatibility = 1.8 |
| |
| repositories { |
| mavenLocal() |
| mavenCentral() |
| } |
| |
| dependencies { |
| compileOnly 'org.slf4j:slf4j-api:1.7.25' |
| compileOnly 'javax:javaee-api:7.0' |
| runtime 'ch.qos.logback:logback-classic:1.2.3' |
| |
| testCompile 'junit:junit:4.12' |
| testCompile 'org.assertj:assertj-core:3.6.2' |
| testCompile 'org.mockito:mockito-core:2.13.0' |
| testCompile 'javax:javaee-api:7.0' |
| } |
| |
| task sourcesJar(type: Jar, dependsOn: classes) { |
| classifier = 'sources' |
| from sourceSets.main.allSource |
| } |
| |
| artifacts { |
| archives sourcesJar |
| } |
| } |
| |
| clean { |
| dependsOn gradle.includedBuilds*.task(':clean') |
| } |
| |
| configurations.all { |
| resolutionStrategy.dependencySubstitution { |
| substitute module("de.rechner:openatfx") with project(":org.eclipse.mdm.openatfx") |
| } |
| exclude group: 'com.sun.mail', module: 'javax.mail' |
| exclude group: 'javax.ws.rs', module: 'javax.ws.rs-api' |
| exclude group: 'javax.activation', module: 'activation' |
| exclude group: 'javax.annotation', module: 'javax.annotation-api' |
| exclude group: 'javax.inject', module: 'javax.inject' |
| exclude group: 'org.glassfish.hk2.external', module: 'javax.inject' |
| exclude group: 'commons-logging', module: 'commons-logging' |
| // exclude guava dependencies |
| exclude group: 'com.google.code.findbugs', module: 'jsr305' |
| exclude group: 'com.google.errorprone', module: 'error_prone_annotations' |
| exclude group: 'com.google.j2objc', module: 'j2objc-annotations' |
| exclude group: 'org.codehaus.mojo', module: 'animal-sniffer-annotations' |
| exclude group: 'org.checkerframework', module: 'checker-compat-qual' |
| } |
| |
| dependencies { |
| runtime project(':org.eclipse.mdm.application') |
| runtime project(':org.eclipse.mdm.apicopy') |
| |
| // adapters |
| runtime project(':org.eclipse.mdm.api.atfxadapter') |
| runtime "org.eclipse.mdm:org.eclipse.mdm.api.odsadapter:${version}" |
| } |
| |
| |
| task collectConfiguration() { |
| doLast { |
| subprojects.each { subproject -> |
| copy { |
| from "${project.projectDir}/${subproject.name}/src/main/configuration/" |
| into "${project.projectDir}/build/tmp/openmdm_application/configuration/${subproject.name}" |
| } |
| } |
| } |
| } |
| |
| task copySchema(dependsOn: ':org.eclipse.mdm.preferences:generateSchema') { |
| doLast { |
| copy { |
| from "${project.projectDir}/org.eclipse.mdm.preferences/build/generated-schema/" |
| into "${project.projectDir}/build/tmp/openmdm_application/schema/org.eclipse.mdm.preferences" |
| } |
| } |
| } |
| |
| task distribute(type: Zip) { |
| archiveName = "openMDM_application-${version}.zip" |
| |
| from "${project.projectDir}/LICENSE.txt" |
| from "${project.projectDir}/NOTICE.txt" |
| from "${project.projectDir}/readme.md" |
| from "${project.projectDir}/release_notes.md" |
| |
| from "${project.projectDir}/doc/GettingStarted_mdmbl.pdf" |
| from "${project.projectDir}/doc/Installation Guide for the openMDM5 Application.pdf" |
| |
| from "${project.projectDir}/build/tmp/openmdm_application" |
| from "${project.projectDir}/build/libs/" |
| } |
| distribute.dependsOn(collectConfiguration) |
| distribute.dependsOn(copySchema) |
| |
| war { |
| from ('org.eclipse.mdm.application/build/node/dist') { |
| include('**/*') |
| } |
| |
| webXml = file('org.eclipse.mdm.application/src/main/webconfig/web.xml') |
| webInf {from 'org.eclipse.mdm.application/src/main/webconfig/glassfish-web.xml'} |
| |
| metaInf { from 'NOTICE.txt' } |
| metaInf { from 'LICENSE.txt' } |
| } |
| |
| war.finalizedBy(distribute) |
| |
| jacoco { |
| toolVersion = "0.7.6.201602180812" |
| reportsDir = file("${project.buildDir}/jacoco/test.exec") |
| } |
| |
| sonarqube { |
| properties { |
| property "sonar.java.coveragePlugin", "jacoco" |
| property "sonar.jacoco.reportPaths", "${project.buildDir}/jacoco/test.exec" |
| } |
| } |
| tasks["sonarqube"].dependsOn "org.eclipse.mdm.application:map_tslint" |
| |
| buildscript { |
| repositories { |
| maven { url "http://repo1.maven.org/maven2/" } |
| maven { url "https://plugins.gradle.org/m2/" } |
| mavenLocal() |
| } |
| dependencies { classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.5' } |
| } |