Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
118 lines (102 sloc) 3.52 KB
/*
* Copyright 2012 Canoo Engineering AG.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
apply plugin: 'idea'
/*ext {
dolphinVersion = '0.1-SNAPSHOT'
}*/
subprojects {
apply plugin: 'groovy'
apply plugin: 'idea'
sourceCompatibility = '1.6'
targetCompatibility = '1.6'
archivesBaseName = "dolphin-${project.name}"
// version = dolphinVersion
ext {
javaFxHome = System.env['JAVAFX_HOME']
javaHome = System.env['JAVA_HOME']
jdk7 = System.getProperty('java.version')[0..2].toDouble() >= 1.7
}
if (!jdk7 && !javaFxHome) {
println "please set JAVAFX_HOME to the dir that contains the rt/lib/jfxrt.jar"
System.exit 1
}
repositories {
flatDir name: 'javafx', dirs: javaFxHome? ["$javaFxHome/rt/lib/"] : ["$javaHome/jre/lib/"]
mavenCentral()
}
dependencies {
groovy 'org.codehaus.groovy:groovy-all:1.8.6'
testCompile 'org.spockframework:spock-core:0.6-groovy-1.8', {
exclude group:'org.codehaus.groovy', module: 'groovy-all'
}
testRuntime 'net.sourceforge.cobertura:cobertura:1.9.4.1'
}
task makeDirs(description:'make all dirs for project setup') << {
def sources = [sourceSets.main, sourceSets.test]
sources*.allSource*.srcDirs.flatten().each { File srcDir ->
println "making $srcDir"
srcDir.mkdirs()
}
}
if ( ! project.hasProperty('coverage')) return
if ( project.name.startsWith('demo-')) return
apply from: "${rootDir}/gradle/coverage.gradle"
}
def mavenizedProjects() {
[
project(':client'),
project(':client-javafx'),
project(':shared'),
project(':server'),
project(':demo-javafx-server'), // for testing with dolphin-grails
project(':demo-javafx-shared'), // for testing with dolphin-grails
]
}
configure(mavenizedProjects()) {
group = 'com.canoo.dolphin'
apply plugin: 'maven'
}
def distDir = new File(rootDir, 'dist')
def grailsLibDir = new File(rootDir, 'dolphin-grails/lib')
subprojects.each { proj ->
evaluationDependsOn proj.path
proj.jar.doLast { jarTask ->
copy {
from jarTask.archivePath
into distDir
}
if (proj.name.contains('server') || proj.name.contains('shared')) {
copy {
from jarTask.archivePath
into grailsLibDir
}
}
}
//if (proj.name.startsWith('demo-')){ // for the moment, zip all sources, not only the demos
proj.tasks.add(name: 'demoZip', type: Zip) {
classifier = 'src'
destinationDir = distDir
from proj.sourceSets*.allSource
}
//}
}
task wrapper(type:Wrapper, description:"create a gradlew") {
gradleVersion = '1.0'
}
apply {
from 'buildSrc/scripts/docsDependencies.gradle'
from 'buildSrc/scripts/docs.gradle'
}
Jump to Line
Something went wrong with that request. Please try again.