1 Star 0 Fork 10

zdjkea/sample

forked from 创易/sample 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
build.gradle 4.79 KB
一键复制 编辑 原始数据 按行查看 历史
yq76034150 提交于 2016-11-06 17:26 . init commit
buildscript {
repositories {
mavenLocal()
maven { url 'http://repository.jboss.com/maven2/' }
mavenCentral()
jcenter()
maven { url "http://repo.spring.io/plugins-release" }
maven { url "http://repo.spring.io/milestone" }
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.0.1"
classpath "org.springframework.boot:spring-boot-gradle-plugin:${springbootVersion}"
classpath "net.ltgt.gradle:gradle-apt-plugin:0.6"
classpath "org.springframework.build.gradle:propdeps-plugin:0.0.7"
classpath "se.transmode.gradle:gradle-docker:1.2"
classpath "io.spring.gradle:dependency-management-plugin:0.5.6.RELEASE"
//jhipster-needle-gradle-buildscript-dependency - JHipster will add additional gradle build script plugins here
classpath 'org.gradle.api.plugins:gradle-nexus-plugin:0.4'
classpath 'org.hibernate.build.gradle:gradle-maven-publish-auth:2.0.1+'
}
}
apply plugin: 'java'
sourceCompatibility=1.8
targetCompatibility=1.8
apply plugin: 'maven'
apply plugin: 'propdeps'
apply plugin: 'io.spring.dependency-management'
test {
include '**/*UnitTest*'
include '**/*IntTest*'
ignoreFailures true
reports.html.enabled = false
}
task testReport(type: TestReport) {
destinationDir = file("$buildDir/reports/tests")
reportOn test
}
/** 此闭包内的声明子类皆可使用 */
allprojects {
group = 'cn.starteasy.sample'
version = '0.0.1-SNAPSHOT'
apply plugin: 'java'
sourceCompatibility=1.8
targetCompatibility=1.8
apply plugin: 'maven'
apply plugin: 'propdeps'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
apply plugin: 'maven-publish-auth'
repositories {
mavenLocal()
maven { url 'http://repository.jboss.com/maven2/' }
mavenCentral()
jcenter()
maven { url 'http://repo.spring.io/milestone' }
maven { url 'http://repo.spring.io/snapshot' }
maven { url 'https://repository.jboss.org/nexus/content/repositories/releases' }
maven { url 'https://oss.sonatype.org/content/repositories/releases' }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
maven { url 'http://repo.maven.apache.org/maven2' }
maven { url "http://repo.startupeasy.cn:8081/repository/maven-public/" }
}
publishing {
task sourceJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
publications {
mavenJava(MavenPublication) { from components.java }
mavenJava(MavenPublication) {
artifact(sourceJar) {
classifier = "sources"
}
}
}
repositories {
maven {
name = 'starteasy'
url "http://repo.startupeasy.cn:8081/repository/maven-${project.version.endsWith('-SNAPSHOT') ? 'snapshots' : 'releases'}"
}
}
}
// tasks.withType(Compile) {
// options.encoding = "UTF-8"
// }
}
task createREADME() {
file("README.md").createNewFile()
}
subprojects {
task "createJavaProject" << {
sourceSets*.java.srcDirs*.each { it.mkdirs() }
sourceSets*.resources.srcDirs*.each { it.mkdirs() }
/** 可选生成子文件夹 */
file("src/main/filters").mkdirs()
file("src/main/assembly").mkdirs()
file("src/main/config").mkdirs()
file("src/main/scripts").mkdirs()
/** 填充文件,便于git提交 */
file("src/main/java/cn/starteasy").mkdirs()
file("src/main/java/cn/starteasy/package-info.java").createNewFile()
file("src/main/resources").mkdirs()
file("src/main/resources/spring.xml").createNewFile()
file("src/test/java/cn/starteasy").mkdirs()
file("src/test/java/cn/starteasy/package-info.java").createNewFile()
file("src/test/resources/spring.xml").createNewFile()
}
/** 有时候会报错,但需要执行 */
// task createREADME(){
// file("README.md").createNewFile()
// }
configurations {
provided
compile.extendsFrom provided
all*.exclude group: 'org.springframework', module: 'spring'
all*.exclude group: 'asm', module: 'asm'
all*.exclude group: 'log4j', module: 'log4j'
all*.exclude group: 'org.slf4j', module: 'slf4j-log4j12'
}
}
configure(subprojects.findAll { it.name.contains('war') }) {
apply plugin: 'war'
task createWebProject(dependsOn: 'createJavaProject') << {
def webAppDir = file("$webAppDirName")
webAppDir.mkdirs()
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zdjkea/sample.git
[email protected]:zdjkea/sample.git
zdjkea
sample
sample
master

搜索帮助