2022-09-20 15:40:53 +02:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* ******************************************************************************
|
|
|
|
* *
|
|
|
|
* * This program and the accompanying materials are made available under the
|
|
|
|
* * terms of the Apache License, Version 2.0 which is available at
|
|
|
|
* * https://www.apache.org/licenses/LICENSE-2.0.
|
|
|
|
* *
|
|
|
|
* * See the NOTICE file distributed with this work for additional
|
|
|
|
* * information regarding copyright ownership.
|
|
|
|
* * Unless required by applicable law or agreed to in writing, software
|
|
|
|
* * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
* * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
* * License for the specific language governing permissions and limitations
|
|
|
|
* * under the License.
|
|
|
|
* *
|
|
|
|
* * SPDX-License-Identifier: Apache-2.0
|
|
|
|
* *****************************************************************************
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
dependencies {
|
|
|
|
classpath "com.vanniktech:gradle-dependency-graph-generator-plugin:0.6.0"
|
|
|
|
classpath 'com.google.gradle:osdetector-gradle-plugin:1.7.0'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
apply plugin: "com.vanniktech.dependency.graph.generator"
|
|
|
|
apply plugin: 'com.google.osdetector'
|
|
|
|
|
|
|
|
ext {
|
|
|
|
buildTarget = (properties.CAVIS_TARGET ?: osdetector.classifier).toLowerCase() //if not defined otherwise, we build target is the same as build host
|
|
|
|
logger.quiet("Building host platform is '{}' and build target(s) are '{}'", osdetector.classifier, buildTarget)
|
|
|
|
buildSupportMatrix = [[host: "windows-x86_64",
|
|
|
|
canBuild: ["windows-x86_64",
|
|
|
|
"windows-x86"]
|
|
|
|
],
|
|
|
|
[host: "linux-x86_64",
|
|
|
|
canBuild: ["linux-x86_64", "linux-arm64"]
|
|
|
|
]]
|
|
|
|
logger.quiet("Print {}", buildSupportMatrix)
|
|
|
|
|
|
|
|
scalaVersion = "2.12"
|
|
|
|
logger.quiet("Scala main version is set to {}", scalaVersion)
|
2022-10-12 12:03:08 +02:00
|
|
|
logger.quiet("Running java {}", JavaVersion.current())
|
2022-09-20 15:40:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
configurations.all {
|
|
|
|
resolutionStrategy {
|
|
|
|
// fail eagerly on version conflict (includes transitive dependencies)
|
|
|
|
// e.g. multiple different versions of the same dependency (group and name are equal)
|
|
|
|
failOnVersionConflict()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-10-21 16:36:56 +02:00
|
|
|
|
2022-09-20 15:40:53 +02:00
|
|
|
allprojects { Project proj ->
|
|
|
|
apply plugin: 'com.google.osdetector'
|
|
|
|
|
|
|
|
version = "1.0.0-SNAPSHOT"
|
|
|
|
group = "net.brutex.cavis"
|
|
|
|
|
|
|
|
|
|
|
|
plugins.withType(JavaPlugin) {
|
2022-10-12 12:03:08 +02:00
|
|
|
sourceCompatibility = JavaVersion.VERSION_11
|
|
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
2022-10-12 11:01:57 +02:00
|
|
|
tasks.withType(JavaCompile) {
|
|
|
|
options.release = 8
|
|
|
|
}
|
2022-09-20 15:40:53 +02:00
|
|
|
dependencies {
|
|
|
|
|
|
|
|
implementation platform(project(":cavis-common-platform"))
|
|
|
|
compileOnly platform(project(":cavis-common-platform"))
|
|
|
|
annotationProcessor platform(project(":cavis-common-platform"))
|
|
|
|
testCompileOnly platform(project(":cavis-common-platform"))
|
|
|
|
testAnnotationProcessor platform(project(":cavis-common-platform"))
|
|
|
|
testImplementation platform(project(":cavis-common-platform"))
|
|
|
|
|
2022-10-10 17:01:23 +02:00
|
|
|
compileOnly 'org.projectlombok:lombok'
|
|
|
|
annotationProcessor 'org.projectlombok:lombok'
|
|
|
|
testCompileOnly 'org.projectlombok:lombok'
|
|
|
|
testAnnotationProcessor 'org.projectlombok:lombok'
|
|
|
|
testImplementation 'org.junit.jupiter:junit-jupiter-engine'
|
|
|
|
testImplementation 'org.junit.jupiter:junit-jupiter-api'
|
|
|
|
testImplementation 'org.junit.jupiter:junit-jupiter-params'
|
|
|
|
|
|
|
|
implementation "org.slf4j:slf4j-api"
|
|
|
|
implementation "org.slf4j:slf4j-simple"
|
2022-09-20 15:40:53 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
test {
|
|
|
|
useJUnitPlatform {
|
|
|
|
if( project.hasProperty("includeTags") ) {
|
|
|
|
it.includeTags=project.getProperty("includeTags").split(",")
|
|
|
|
}
|
|
|
|
if( project.hasProperty("excludeTags") ) {
|
|
|
|
it.excludeTags=project.getProperty("excludeTags").split(",")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ignoreFailures = true
|
|
|
|
testLogging {
|
|
|
|
events "PASSED", "SKIPPED", "FAILED", "STANDARD_OUT", "STANDARD_ERROR"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
plugins.withType(MavenPublishPlugin) {
|
|
|
|
publishing {
|
|
|
|
publications {
|
|
|
|
mavenJava(MavenPublication) {
|
|
|
|
/* Need to verify the property exists, as some
|
|
|
|
modules may not declare it (i.e. the java-platform plugin)
|
|
|
|
*/
|
|
|
|
if (components.hasProperty("java") && !proj.name.equals("cavis-native-lib")) {
|
|
|
|
from components.java
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
repositories {
|
|
|
|
|
2022-09-24 10:46:55 +02:00
|
|
|
maven {
|
|
|
|
name = 'LocalRemote'
|
|
|
|
def releasesRepoUrl = 'https://archiva.brutex.net/repository/internal/'
|
|
|
|
def snapshotsRepoUrl = 'https://archiva.brutex.net/repository/snapshots/'
|
|
|
|
url = proj.version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
|
|
|
|
allowInsecureProtocol = false
|
|
|
|
credentials {
|
|
|
|
username = mavenuser
|
|
|
|
password = mavenpass
|
2022-09-20 15:40:53 +02:00
|
|
|
}
|
2022-09-24 10:46:55 +02:00
|
|
|
}
|
2022-09-20 15:40:53 +02:00
|
|
|
/*
|
|
|
|
maven {
|
|
|
|
name = 'OSSRH'
|
|
|
|
def releasesRepoUrl = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
|
|
|
|
def snapshotsRepoUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
|
|
|
|
url = proj.version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
|
|
|
|
credentials {
|
|
|
|
username = ossrhUsername
|
|
|
|
password = ossrhPassword
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
*/
|
2022-09-24 10:46:55 +02:00
|
|
|
/*
|
|
|
|
maven {
|
|
|
|
name = 'localGitea'
|
|
|
|
def releasesRepoUrl = 'http://bru3-pc.fritz.box:3000/api/packages/brutex/maven'
|
|
|
|
def snapshotsRepoUrl = 'http://bru3-pc.fritz.box:3000/api/packages/brutex/maven'
|
|
|
|
url = proj.version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
|
|
|
|
allowInsecureProtocol = true
|
|
|
|
credentials {
|
|
|
|
username = mavenuser
|
|
|
|
password = mavenpass
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
|
2022-09-20 15:40:53 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-10-21 16:36:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
task aggregatedJavadocs(type: Javadoc, description: 'Generate javadocs from all child projects as if it was a single project', group: 'Documentation') {
|
|
|
|
subprojects.each { proj ->
|
|
|
|
proj.tasks.withType(Javadoc).each { javadocTask ->
|
|
|
|
logger.quiet("Adding javadoc for project " + proj.name)
|
|
|
|
source += javadocTask.source
|
|
|
|
classpath += javadocTask.classpath
|
|
|
|
excludes += javadocTask.excludes
|
|
|
|
includes += javadocTask.includes
|
|
|
|
}
|
|
|
|
}
|
|
|
|
destinationDir = file("$buildDir/docs/javadoc")
|
|
|
|
title = "$project.name $version API"
|
|
|
|
options.author true
|
|
|
|
options.links 'http://docs.oracle.com/javase/8/docs/api/'
|
|
|
|
options.addStringOption('Xdoclint:none', '-quiet')
|
|
|
|
}
|