// SPDX-FileCopyrightText: The openTCS Authors // SPDX-License-Identifier: MIT buildscript { repositories { mavenLocal() mavenCentral() } } plugins { id 'maven-publish' id 'signing' id 'org.barfuin.gradle.jacocolog' version '3.1.0' id 'com.github.jk1.dependency-license-report' version '2.9' id 'com.diffplug.spotless' version '7.0.0.BETA4' id 'io.github.gradle-nexus.publish-plugin' version '2.0.0' } import com.github.jk1.license.filter.LicenseBundleNormalizer import com.github.jk1.license.render.CsvReportRenderer import com.github.jk1.license.render.InventoryHtmlReportRenderer apply plugin: 'base' // To add "clean" task to the root project. apply plugin: 'distribution' apply from: "${rootDir}/gradle/common.gradle" apply from: "${rootDir}/gradle/publishing-gitlab.gradle" apply from: "${rootDir}/gradle/publishing-ossrh.gradle" subprojects { apply from: rootProject.file('gradle/common.gradle') } repositories { mavenLocal() mavenCentral() } distributions { main { contents.from { project(':opentcs-kernel').ext.collectableDistDir } contents.from { project(':opentcs-kernelcontrolcenter').ext.collectableDistDir } contents.from { project(':opentcs-modeleditor').ext.collectableDistDir } contents.from { project(':opentcs-operationsdesk').ext.collectableDistDir } contents.from { project(':opentcs-documentation').ext.collectableDistDir } } } task subDists { dependsOn(':opentcs-kernel:installDist') dependsOn(':opentcs-kernelcontrolcenter:installDist') dependsOn(':opentcs-modeleditor:installDist') dependsOn(':opentcs-operationsdesk:installDist') dependsOn(':opentcs-documentation:installDist') } installDist.dependsOn subDists distZip { archiveClassifier = 'bin' dependsOn subDists } distTar { enabled = false archiveClassifier = 'bin' dependsOn subDists } task distSrcZip(type: Zip) { archiveClassifier = 'src' from "${rootDir}" includes << 'config/**' includes << 'gradle/**' includes << 'opentcs-*/**' includes << 'src/**' includes << '*.gradle' includes << 'gradlew' includes << 'gradlew.bat' excludes << '.gitlab' excludes << '.gitlab-ci.yml' excludes << '.gradle' excludes << '**/build' } build { subprojects.each { dependsOn("${it.name}:build") } dependsOn installDist } task release { dependsOn build subprojects.each { dependsOn("${it.name}:release") } dependsOn distZip dependsOn distSrcZip } licenseReport { outputDir = "${buildDir}/license-report" configurations = ['runtimeClasspath', 'guiceConfigRuntimeClasspath'] excludeBoms = true filters = [new LicenseBundleNormalizer(bundlePath: "$projectDir/config/license-normalizer-bundle.json")] renderers = [ new CsvReportRenderer('third-party-licenses.csv'), new InventoryHtmlReportRenderer('third-party-licenses.html') ] }