blob: b57b44d4aff9d99dd3e1f4c0f0f57c77b2e2b164 [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.
*/
defaultTasks 'addAndroidTargetDir'
// Avoid creating/staging an empty jar (this is a 'java' subproject)
jar {
deleteAllActions()
}
// let the existing ant script do all of the work
ant.importBuild('build.xml') { antTargetName ->
'ant_' + antTargetName
}
ant.properties['edgent8.target'] = target_java8_dir
ant.properties['edgent7.target'] = target_java7_dir
ant.properties['edgent.android.target'] = target_android_dir
clean {
dependsOn ant_clean
}
task addAndroidTargetDir {
description = "Assemble distribution artifacts for android (from java7 artifacts)"
dependsOn ':platform:java7:addJava7TargetDir', clean, ant_all
ant_all.mustRunAfter ':platform:java7:addJava7TargetDir'
ant_all.mustRunAfter clean
// TODO the following isn't cutting it for adding up-to-date for this task
// so as to avoid unnecessarily running clean,ant_all
// ... well things just don't quite work the way I hoped.
// A task's dependencies are run before a task is checked for UTD
// inputs.dir(target_java7_dir)
// outputs.dir(target_android_dir)
}
// unlike the above, this has the benefit(?) of producing the ant output to stdout
// But it requires 'ant' to be in the path and doesn't (can't?) use
// the ant that's embedded with gradle hmm...
//
//task androidXXX(type: Exec) {
// description = "Assemble distribution artifacts for android (from java7 artifacts)"
// dependsOn :platform:java7:java7
// workingDir 'platform/android'
// commandLine 'ant', 'clean', 'all',
// '-Dedgent8.target=../../build/distributions/java8',
// '-Dedgent7.target=../../build/distributions/java7',
// '-Dedgent.android.target=../../build/distributions/android'
//}