1 Star 2 Fork 1

中恒/opentcs-integration-example

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
build.gradle 3.49 KB
一键复制 编辑 原始数据 按行查看 历史
Stefan Walter 提交于 2022-07-13 13:50 . Integrate gradle-jacoco-log plugin
buildscript {
repositories {
mavenLocal()
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
// License plugin
classpath 'gradle.plugin.nl.javadude.gradle.plugins:license-gradle-plugin:0.14.0'
// Stats plugin
classpath 'org.kordamp.gradle:stats-gradle-plugin:0.2.2'
// JaCoCo log plugin
classpath 'gradle.plugin.org.barfuin.gradle.jacocolog:gradle-jacoco-log:2.0.0'
}
}
apply plugin: 'base'
apply plugin: 'distribution'
apply plugin: 'groovy'
apply plugin: 'org.barfuin.gradle.jacocolog'
apply from: "${rootDir}/gradle/common.gradle"
apply from: "${rootDir}/gradle/publishing-common.gradle"
evaluationDependsOnChildren()
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
implementation localGroovy()
implementation group: 'commons-io', name: 'commons-io', version: '2.11.0'
}
subprojects {
apply from: rootProject.file('gradle/common.gradle')
apply from: rootProject.file('gradle/publishing-java.gradle')
}
distributions {
main {
contents.from {
project(':openTCS-Example-Kernel').ext.collectableDistDir
}
contents.from {
project(':openTCS-Example-KernelControlCenter').ext.collectableDistDir
}
contents.from {
project(':openTCS-Example-ModelEditor').ext.collectableDistDir
}
contents.from {
project(':openTCS-Example-OperationsDesk').ext.collectableDistDir
}
contents.from {
project(':openTCS-Example-Documentation').ext.collectableDistDir
}
}
}
task statsAggregate(type: org.kordamp.gradle.stats.AggregateStatsReportTask) {
dependsOn subprojects*.stats
}
task subDists {
dependsOn(':openTCS-Example-Kernel:installDist')
dependsOn(':openTCS-Example-KernelControlCenter:installDist')
dependsOn(':openTCS-Example-ModelEditor:installDist')
dependsOn(':openTCS-Example-OperationsDesk:installDist')
dependsOn(':openTCS-Example-Documentation:installDist')
}
installDist.dependsOn subDists
distZip {
classifier = 'bin'
dependsOn subDists
}
distTar {
classifier = 'bin'
dependsOn subDists
compression = Compression.GZIP
}
task distSrcZip(type: Zip) {
classifier = 'src'
from "${rootDir}"
includes << 'config/**'
includes << 'gradle/**'
includes << 'lib/**'
includes << 'openTCS-*/**'
includes << 'src/**'
includes << '.nb-gradle-properties'
includes << '*.gradle'
includes << 'gradlew'
includes << 'gradlew.bat'
includes << 'README.md'
excludes << '.gradle'
excludes << '**/build'
}
artifacts {
archives distZip
archives distTar
archives distSrcZip
}
build {
dependsOn subprojects*.build
dependsOn installDist
}
// tag::cloneTask
task cloneProject(type: JavaExec) {
main = 'org.opentcs.scripts.CloneScript'
classpath = sourceSets.main.runtimeClasspath
def integrationName = 'MyCustomProject'
def classPrefix = 'Custom'
def packageName = 'com.example'
if (project.hasProperty('integrationName')) {
integrationName = project.getProperty('integrationName')
}
if (project.hasProperty('classPrefix')) {
classPrefix = project.getProperty('classPrefix')
}
if (project.hasProperty('packageName')) {
packageName = project.getProperty('packageName')
}
// Pass command-line argument to script, if any.
args integrationName, classPrefix, packageName
}
// tag::cloneTask
publish.dependsOn subprojects*.publish
publishing {
publications {
maven(MavenPublication) {
artifact distZip
artifact distSrcZip
pom {
artifactId = 'distribution'
}
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/yuanji1020/opentcs-integration-example.git
git@gitee.com:yuanji1020/opentcs-integration-example.git
yuanji1020
opentcs-integration-example
opentcs-integration-example
master

搜索帮助