|
| 1 | +buildscript { |
| 2 | + repositories { |
| 3 | + maven { url "https://repo.grails.org/grails/core" } |
| 4 | + } |
| 5 | + dependencies { |
| 6 | + classpath "org.grails:grails-gradle-plugin:$grailsGradlePluginVersion" |
| 7 | + classpath "org.grails.plugins:views-gradle:$viewGradleVersion" |
| 8 | + classpath "org.grails.plugins:views-json:$viewsJsonVersion" |
| 9 | + classpath "org.grails:grails-docs:${project.ext.properties.grailsDocsVersion ?: grailsVersion}" |
| 10 | + classpath "io.github.gradle-nexus:publish-plugin:1.3.0" |
| 11 | + } |
| 12 | +} |
| 13 | + |
| 14 | +repositories { |
| 15 | + mavenCentral() |
| 16 | + maven { url "https://repo.grails.org/grails/core" } |
| 17 | +} |
| 18 | + |
| 19 | +version project.projectVersion |
| 20 | + |
| 21 | +ext { |
| 22 | + commonBuild = 'https://raw.githubusercontent.com/grails/grails-common-build/v2.0.1' |
| 23 | +} |
| 24 | + |
| 25 | +subprojects { |
| 26 | + |
| 27 | + version project.projectVersion |
| 28 | + |
| 29 | + ext { |
| 30 | + userOrg = "grails" |
| 31 | + isGrailsPlugin = name.startsWith('grails-plugin') |
| 32 | + isBuildSnapshot = version.toString().endsWith("-SNAPSHOT") |
| 33 | + } |
| 34 | + |
| 35 | + repositories { |
| 36 | + maven { url "https://repo.grails.org/grails/core" } |
| 37 | + } |
| 38 | + |
| 39 | + tasks.withType(GroovyCompile).configureEach { |
| 40 | + configure(groovyOptions) { |
| 41 | + forkOptions.jvmArgs = ['-Xmx1024m'] |
| 42 | + } |
| 43 | + } |
| 44 | + |
| 45 | + tasks.withType(Test).configureEach { |
| 46 | + testLogging { |
| 47 | + events "failed" |
| 48 | + exceptionFormat "full" |
| 49 | + showStandardStreams true |
| 50 | + } |
| 51 | + } |
| 52 | + |
| 53 | + if (project.name.startsWith("examples-")) { |
| 54 | + if (project.name.startsWith("examples-grails-")) { |
| 55 | + apply plugin: "org.grails.grails-web" |
| 56 | + } |
| 57 | + return |
| 58 | + } |
| 59 | + |
| 60 | + if (isGrailsPlugin) { |
| 61 | + group "org.grails.plugins" |
| 62 | + } else { |
| 63 | + group "org.grails" |
| 64 | + } |
| 65 | + |
| 66 | + if (isGrailsPlugin) { |
| 67 | + apply plugin: 'groovy' |
| 68 | + apply plugin: 'eclipse' |
| 69 | + apply plugin: 'idea' |
| 70 | + apply plugin: 'java-library' |
| 71 | + apply plugin: "org.grails.grails-plugin" |
| 72 | + |
| 73 | + sourceCompatibility = 1.11 |
| 74 | + targetCompatibility = 1.11 |
| 75 | + } else { |
| 76 | + apply from: "${commonBuild}/common-project.gradle" |
| 77 | + } |
| 78 | + |
| 79 | + dependencies { |
| 80 | + implementation "com.graphql-java:graphql-java:$graphqlJavaVersion" |
| 81 | + testImplementation "org.codehaus.groovy:groovy-test:$groovyVersion" |
| 82 | + testImplementation "io.projectreactor:reactor-test:3.6.1" |
| 83 | + testImplementation("org.spockframework:spock-core:$spockVersion") |
| 84 | + implementation 'org.grails:grails-datastore-gorm:7.3.4' |
| 85 | + } |
| 86 | +} |
| 87 | + |
| 88 | +apply from: "${commonBuild}/common-publishing.gradle" |
0 commit comments