1 Star 0 Fork 23

skymysky/Micronaut

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build.gradle 9.45 KB
一键复制 编辑 原始数据 按行查看 历史
Graeme Rocher 提交于 2018-05-23 17:16 . Improve build logging
buildscript {
repositories {
maven { url "https://repo.grails.org/grails/core" }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
classpath "org.grails:grails-docs:$grailsVersion"
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1'
classpath 'io.github.groovylang.groovydoc:groovydoc-gradle-plugin:1.0.1'
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.2'
}
}
plugins {
id 'com.github.hierynomus.license' version '0.14.0' apply false
}
repositories {
maven { url "https://repo.grails.org/grails/core" }
maven { url "http://oss.sonatype.org/content/repositories/snapshots/" }
}
version project.projectVersion
ext {
distInstallDir = file("$buildDir/dist-tmp")
homeBinDir = file("bin")
homeLibDir = file("lib")
homeSrcDir = file("src")
}
ext {
dependencyVersions = [
groovy: [
version:groovyVersion,
group:'org.codehaus.groovy',
name: 'groovy',
modules:['groovy-test','groovy-ant','groovy-json','groovy-jmx']
],
gorm: [
version:gormVersion,
group:'org.grails',
name: 'grails-datastore-core',
modules:['grails-datastore-gorm','grails-datastore-gorm-hibernate5']
],
jackson: [
version: jacksonVersion,
group:'com.fasterxml.jackson.core',
name:'jackson-databind'
],
'jackson.modules': [
version: jacksonVersion,
group:'com.fasterxml.jackson.module',
name:'jackson-module-afterburner'
],
'jackson.datatype': [
version: jacksonVersion,
group:'com.fasterxml.jackson.datatype',
name:'jackson-datatype-jdk8',
modules:['jackson-datatype-jsr310']
],
jsr305:[
version:jsr305Version,
group:'com.google.code.findbugs',
name:'jsr305'
],
mongodb:[
version: mongoVersion,
group:'org.mongodb',
name:'mongo-java-driver',
modules:['mongodb-driver-async']
],
neo4j: [
version: neo4jVersion,
group:'org.neo4j.test',
name:'neo4j-harness'
],
'neo4j.bolt': [
version: '1.5.1',
group:'org.neo4j.driver',
name:'neo4j-java-driver'
],
netty: [
version: nettyVersion,
group:'io.netty',
name:'netty-codec-http',
modules:['netty-handler','netty-handler-proxy']
],
lettuce: [
version: lettuceVersion,
group:'io.lettuce',
name:'lettuce-core'
],
spring: [
version: springVersion,
group:'org.springframework',
name: 'spring-core',
modules:['spring-context', 'spring-tx', 'spring-orm']
],
snakeyaml: [
version: yamlVersion,
group:'org.yaml',
name: 'snakeyaml'
],
slf4j: [
version: slf4jVersion,
group:'org.slf4j',
name: 'slf4j-api',
modules: ['slf4j-simple']
],
spock: [
version: spockVersion,
group:'org.spockframework',
name: 'spock-core'
],
'reactive.streams':[
version:reactiveStreamsVersion,
group:'org.reactivestreams',
name:'reactive-streams'
],
rxjava1: [
version: rxJava1Version,
group:'io.reactivex',
name: 'rxjava'
],
'rxjava1.interop': [
version: rxJavaInteropVersion,
group:'com.github.akarnokd',
name: 'rxjava2-interop'
],
rxjava2: [
version: rxJava2Version,
group:'io.reactivex.rxjava2',
name: 'rxjava'
],
reactor:[
version: reactorVersion,
group:'io.projectreactor',
name: 'reactor-core'
],
validation: [
version: validationVersion,
group:'javax.validation',
name: 'validation-api'
],
hystrix: [
version: hystrixVersion,
group:'com.netflix.hystrix',
name: 'hystrix-core',
modules:['hystrix-serialization']
]
]
dependencyVersion = { String name ->
def dep = dependencyVersions[name]
if(dep == null) {
throw new IllegalArgumentException("No core dependency defined for name: $name")
}
return "$dep.group:$dep.name:$dep.version".toString()
}
dependencyModuleVersion = { String name, String module ->
def dep = dependencyVersions[name]
if(dep == null) {
throw new IllegalArgumentException("No core dependency defined for name: $name")
}
return "$dep.group:$module:$dep.version".toString()
}
}
subprojects { subproject ->
version project.projectVersion
ext {
userOrg = "grails"
isGrailsPlugin = false
isConfiguration = subproject.projectDir.parentFile.name == 'configurations'
isBuildSnapshot = version.toString().endsWith("-SNAPSHOT")
}
if (subproject.name == "configurations") {
return
}
if(isConfiguration) {
group "io.micronaut.configuration"
}
else {
group projectGroupId
}
repositories {
maven { url "http://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://repo.grails.org/grails/core" }
}
if (subproject.name.startsWith("examples")) {
// apply plugin:"org.grails.grails-web"
}
else {
apply plugin:"groovy"
apply plugin:"java"
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
// compileJava.options.compilerArgs.add '-parameters'
// compileTestJava.options.compilerArgs.add '-parameters'
if(!subproject.name.contains('test-suite')) {
apply from:"${rootProject.rootDir}/gradle/publishing.gradle"
apply plugin: 'checkstyle'
checkstyle {
toolVersion = 8.10
configFile = rootProject.file('config/checkstyle/checkstyle.xml')
// Per submodule
maxErrors = 5
maxWarnings = 10
showViolations = true
}
checkstyleTest.enabled = false
}
}
tasks.withType(Test) {
testLogging {
showStandardStreams = !System.getenv("TRAVIS")
exceptionFormat = 'full'
}
afterSuite {
System.out.print('.')
System.out.flush()
}
}
configurations {
shadowCompile
shadowRuntime
documentation
all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
String group = details.requested.group
if(group == 'org.codehaus.groovy') {
details.useVersion(groovyVersion)
}
if(group == 'org.ow2.asm') {
details.useVersion(asmVersion)
}
}
}
}
dependencies {
if (subproject.name != "bom") {
compile dependencyVersion("slf4j")
}
compileOnly "com.github.ben-manes.caffeine:caffeine:$caffeineVersion"
testCompile "com.github.ben-manes.caffeine:caffeine:$caffeineVersion"
testCompile dependencyVersion("groovy")
testCompile(dependencyVersion("spock")) {
exclude module:'groovy-all'
}
testCompile "cglib:cglib-nodep:2.2.2"
testCompile "org.objenesis:objenesis:1.4"
testRuntime "ch.qos.logback:logback-classic:1.2.3"
testCompile "org.codehaus.groovy:groovy-test:$groovyVersion"
compileOnly "org.ow2.asm:asm:$asmVersion"
compileOnly "org.ow2.asm:asm-commons:$asmVersion"
testCompile "org.ow2.asm:asm:$asmVersion"
testCompile "org.ow2.asm:asm-commons:$asmVersion"
}
task allDeps(type: DependencyReportTask) {}
}
apply from:"gradle/docs.gradle"
// IDEA 2017.2 made a breaking change with IDE build output vs gradle build output
// [see https://youtrack.jetbrains.com/issue/IDEA-175172]
// the problem here is the gradle build uses <module-dir>/build/classes/main
// while IDEA uses <module-dir>/out/production/..
// As a result, compiling ast or java-inject module and using the IDEA test runner fails because the
// generated bean classes for injection are in <module-dir>/build, not <module-dir>/out
allprojects {
apply plugin: 'idea'
idea {
module {
outputDir file('build/classes/java/main')
testOutputDir file('build/classes/groovy/test')
}
}
apply from: rootProject.file('gradle/license.gradle')
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/skymysky/Micronaut.git
git@gitee.com:skymysky/Micronaut.git
skymysky
Micronaut
Micronaut
master

搜索帮助