9 Star 27 Fork 13

ideal(harbby) / sylph

加入 Gitee
与超过 600 万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
build.gradle 5.53 KB
一键复制 编辑 Web IDE 原始数据 按行查看 历史
harbby 提交于 2021-07-22 11:55 . update flink version to 1.13.1
plugins {
id "com.github.hierynomus.license" version "0.14.0"
id "com.github.harbby.gradle.serviceloader" version "1.1.5"
id "jacoco"
}
allprojects {
group 'com.github.harbby'
version '0.8.0-SNAPSHOT' //SNAPSHOT
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'checkstyle'
apply plugin: 'jacoco'
def jdk = project.hasProperty('jdk') ? project.jdk : 'java8' //or java11 use -Pjdk=java8
//def jdk = System.getProperty("jdk") ?: "java8" //or java11 use -Djdk=java8
apply from: "$rootProject.projectDir/profile-${jdk}.gradle"
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
tasks.withType(ScalaCompile) {
options.encoding = 'UTF-8'
}
ext.deps = [
flink : '1.13.1',
jetty : "9.4.6.v20170531", //8.1.17.v20150415 "9.4.6.v20170531"
hadoop : "3.2.1",
hbase : '1.1.2',
spark : "3.1.2",
scala : '2.12.8',
joda_time : '2.9.3',
slf4j : '1.7.25',
guice : '4.2.1',
gadtry : '1.9.1',
guava : '27.0-jre',
jackson : '2.9.8',
jersey : '2.28',
scala_binary_version: '2.12'
]
}
subprojects {
if (project != rootProject) {
apply plugin: 'com.github.hierynomus.license'
}
configurations {
testCompile.extendsFrom compileOnly
}
repositories {
mavenLocal()
//maven { url 'http://maven.aliyun.com/nexus/content/groups/public' }
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'com.github.harbby', name: 'gadtry', version: deps.gadtry
}
task clearOutDir(type: Delete) {
delete project.files('out')
}
clean.dependsOn clearOutDir
jacocoTestReport {
reports {
xml.enabled true
html.enabled true
}
}
check.dependsOn jacocoTestReport
checkstyle {
toolVersion '8.12'
showViolations true
}
task checkstyle(type: Checkstyle) {
configFile = file("${rootProject.projectDir}/src/checkstyle/facebook_checks.xml")
source 'src'
include '**/*.java'
exclude '**/gen/**', '**/test/**', '**/build/**', '**/module-info.java'
classpath = files()
}
// assemble.dependsOn 'checkstyle'
/* 如果依赖版本冲突 则直接失败策略设置*/
configurations.all {
resolutionStrategy { failOnVersionConflict() }
}
// ./gradlew sylph-runners:sylph-flink:dependencies
license {
headerDefinitions { //see: http://code.mycila.com/license-maven-plugin/#supported-comment-types
javadoc_style {
firstLine = "/*"
endLine = " */"
beforeEachLine = " * "
afterEachLine = ""
firstLineDetectionPattern = "(\\s|\\t)*/\\*.*\$"
lastLineDetectionPattern = ".*\\*/(\\s|\\t)*\$"
allowBlankLines = false
padLines = false
//skipLine = "//"
isMultiline = true
}
}
header rootProject.file('src/license/LICENSE-HEADER.txt')
strictCheck true
excludes(["**/*.properties", "**/*.sql", "**/*.xml"])
//include "**/*.java"
}
//assemble.dependsOn 'licenseMain','licenseTest'
//licenseMain.includes
//license.mapping('javascript', 'JAVADOC_STYLE')
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
javadoc.failOnError = false
}
artifacts {
archives sourcesJar, javadocJar
}
javadoc {
options {
encoding "UTF-8"
charSet 'UTF-8'
author true
version true
links "https://harbby.github.io/project/sylph/en/docs/intro/"
title "sylph"
}
}
apply plugin: 'signing'
ext {
shouldSign = rootProject.hasProperty('mavenUsername')
mavenUsername = rootProject.hasProperty('mavenUsername') ? rootProject.mavenUsername : ''
mavenPassword = rootProject.hasProperty('mavenPassword') ? rootProject.mavenPassword : ''
}
signing {
required { shouldSign }
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: mavenUsername, password: mavenPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: mavenUsername, password: mavenPassword)
}
pom.project {
name project.name
packaging 'jar'
// optionally artifactId can be defined here
description 'A lightweight API test framework'
url 'https://github.com/harbby/sylph'
scm {
connection 'https://github.com/harbby/sylph.git'
developerConnection 'git@github.com:harbby/sylph.git'
url 'https://github.com/harbby/sylph'
}
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
developers {
developer {
id 'harbby'
name 'harbby'
email 'yezhixinghai@gmail.com'
}
}
}
}
}
}
}

评论 ( 0 )

你可以在登录后,发表评论

Java
1
https://gitee.com/idela-hp/sylph.git
git@gitee.com:idela-hp/sylph.git
idela-hp
sylph
sylph
master

搜索帮助