blob: c4ffa5495665a319e95d6d2e286831b22a5eac9c [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
disableMavenPublishing()
def addTestSource(def source, def geodeVersion) {
// def sourceSet =
sourceSets.create(source, {
compileClasspath += configurations.provided
runtimeClasspath += configurations.provided
})
dependencies.add "${source}Compile", "org.apache.geode:geode-common:$geodeVersion"
dependencies.add "${source}Compile", "org.apache.geode:geode-core:$geodeVersion"
dependencies.add "${source}Compile", "org.apache.geode:geode-lucene:$geodeVersion"
dependencies.add "${source}Compile", "org.apache.geode:geode-old-client-support:$geodeVersion"
dependencies.add "${source}Compile", "org.apache.geode:geode-wan:$geodeVersion"
dependencies.add "${source}Compile", "org.apache.geode:geode-cq:$geodeVersion"
dependencies.add "${source}Compile", "org.apache.geode:geode-rebalancer:$geodeVersion"
}
// Add sourceSets for backwards compatibility, rolling upgrade, and
// pdx testing.
addTestSource('test100', '1.0.0-incubating')
addTestSource('test110', '1.1.0')
addTestSource('test111', '1.1.1')
def generatedResources = "$buildDir/generated-resources/main"
sourceSets {
main {
output.dir(generatedResources, builtBy: 'createGeodeClasspathsFile')
}
}
task createGeodeClasspathsFile {
File classpathsFile = file("$generatedResources/geodeOldVersionClasspaths.txt")
outputs.file(classpathsFile);
doLast {
Properties versions = new Properties();
project(':geode-old-versions').sourceSets.each {
versions.setProperty(it.name,it.runtimeClasspath.getAsPath())
}
classpathsFile.getParentFile().mkdirs();
new FileOutputStream(classpathsFile).withStream { fos ->
versions.store(fos, '')
}
}
}