1 Star 0 Fork 0

heilaoda/btrace

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
common.gradle 2.17 KB
一键复制 编辑 原始数据 按行查看 历史
Jaroslav Bachorik 提交于 2020-02-06 06:51 +08:00 . Preparing release 2.0.0
//
// This file is to be applied to every subproject.
//
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'idea'
project.group = 'org.openjdk.btrace'
project.version = '2.0.0'
sourceCompatibility = '1.7'
targetCompatibility = '1.7'
if (!project.hasProperty("JAVA_8_HOME")) {
project.ext.setProperty("JAVA_8_HOME", System.getenv("JAVA_8_HOME"));
}
if (!project.hasProperty("JAVA_9_HOME")) {
project.ext.setProperty("JAVA_9_HOME", System.getenv("JAVA_9_HOME"));
}
if (!project.hasProperty("JAVA_11_HOME")) {
project.ext.setProperty("JAVA_11_HOME", System.getenv("JAVA_11_HOME"));
}
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
compileJava {
options.fork = true
options.forkOptions.executable = "${project.property("JAVA_8_HOME")}/bin/javac"
}
repositories {
mavenCentral();
// You may define additional repositories, or even remove "mavenCentral()".
// Read more about repositories here:
// http://www.gradle.org/docs/current/userguide/dependency_management.html#sec:repositories
}
dependencies {
// Adding dependencies here will add the dependencies to each subproject.
testCompile group: 'junit', name: 'junit', version: '4.12'
}
String mavenArtifactId = name
javadoc {
options.addStringOption('Xdoclint:all,-missing', '-quiet')
executable = "${JAVA_8_HOME}/bin/javadoc"
failOnError true
}
task sourcesJar(type: Jar, dependsOn: classes, description: 'Creates a jar from the source files.') {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives jar
archives sourcesJar
archives javadocJar
}
configure(install.repositories.mavenInstaller) {
pom.project {
groupId = group ?: "org.openjdk.btrace"
artifactId = mavenArtifactId
version = version ?: "0"
}
}
task createFolders(description: 'Creates the source folders if they do not exist.') doLast {
sourceSets*.allSource*.srcDirs*.each { File srcDir ->
if (!srcDir.isDirectory()) {
println "Creating source folder: ${srcDir}"
srcDir.mkdirs()
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/loos/btrace.git
git@gitee.com:loos/btrace.git
loos
btrace
btrace
master

搜索帮助