| ext { |
| isCiBuild = System.getenv('CI') |
| isSnapshot = projectVersion.endsWith('SNAPSHOT') |
| excludeUnusedTransDeps = findProperty('excludeUnusedTransDeps') |
| } |
| |
| String customGroovyVersion = findProperty('groovyVersion') ?: System.getenv('GROOVY_VERSION') |
| if (customGroovyVersion) { |
| logger.lifecycle("Using custom Groovy version: $customGroovyVersion") |
| } |
| |
| allprojects { |
| |
| if (customGroovyVersion) { |
| configurations.configureEach { |
| resolutionStrategy.eachDependency { DependencyResolveDetails details -> |
| if (details.requested.group == 'org.apache.groovy') { |
| details.useVersion(customGroovyVersion) |
| } |
| } |
| } |
| } |
| |
| repositories { |
| // Used for testing locally against the latest snapshot of Groovy & for pulling dependencies in other repos |
| // Usage: ./gradlew build -P"groovyVersion=X.X.X-SNAPSHOT" |
| maven { |
| name = 'ASF Snapshot repo' |
| url = 'https://repository.apache.org/content/repositories/snapshots' |
| } |
| mavenCentral() |
| maven { url = 'https://repo.grails.org/grails/core' } |
| // mavenLocal() // Keep, this will be uncommented and used by CI (groovy-joint-workflow) |
| if (System.getenv('GITHUB_MAVEN_PASSWORD') && !grailsVersion.endsWith('-SNAPSHOT')) { |
| logger.lifecycle('Adding Grails Core Staging Repo for project: {}', name) |
| maven { |
| url = 'https://maven.pkg.github.com/grails/grails-core' |
| credentials { |
| username = 'DOES_NOT_MATTER' |
| password = System.getenv('GITHUB_MAVEN_PASSWORD') |
| } |
| } |
| } |
| } |
| } |
| |
| // Workaround needed for nexus publishing bug |
| // version and group must be specified in the root project |
| // https://github.com/gradle-nexus/publish-plugin/issues/310 |
| version = projectVersion |
| group = 'this.will.be.overridden' |
| |
| def publishedProjects = [ |
| // datastore |
| 'grails-datastore-async', |
| 'grails-datastore-core', |
| 'grails-datamapping-core', |
| 'grails-datamapping-core-test', |
| 'grails-datamapping-async', |
| //'grails-datamapping-rx', |
| 'grails-datamapping-support', |
| 'grails-datamapping-tck-tests', |
| 'grails-datamapping-tck-base', |
| 'grails-datamapping-tck-domains', |
| 'grails-datamapping-validation', |
| 'grails-datastore-web', |
| 'grails-testing-support-datamapping', |
| // simple |
| 'grails-data-simple', |
| // hibernate5 |
| 'hibernate5-boot-plugin', |
| 'hibernate5-database-migration', |
| 'hibernate5-core', |
| 'hibernate5-grails-plugin', |
| // mongodb |
| 'mongodb-boot-plugin', |
| 'mongodb-core', |
| 'mongodb-bson', |
| 'mongodb-ext', |
| 'mongodb-grails-plugin', |
| 'mongodb-gson-templates' |
| ] |
| subprojects { |
| if (name in publishedProjects) { |
| // This has to be applied here |
| apply plugin: 'org.apache.grails.gradle.grails-publish' |
| } |
| } |
| |
| apply from: layout.projectDirectory.file('gradle/documentation-config.gradle') |