Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

j2objcCycleFinder as j2objcTest dependency instead of j2objcTranslate #338

Merged
merged 1 commit into from
Aug 2, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,22 +81,11 @@ class J2objcPlugin implements Plugin<Project> {
description "Marker task for all tasks that must be complete before j2objc building"
}

// j2objcCycleFinder is disabled by default as it's complex to use and understand.
// TODO: consider enabling by default if it's possible to make it easier to use.
// To enable the j2objcCycleFinder task, add the following to build.gradle:
// j2objcCycleFinder { enabled = true }
tasks.create(name: 'j2objcCycleFinder', type: CycleFinderTask,
dependsOn: 'j2objcPreBuild') {
group 'build'
description "Run the cycle_finder tool on all Java source files"
enabled false
}

// TODO @Bruno "build/source/apt" must be project.j2objcConfig.generatedSourceDirs no idea how to set it
// there
// Dependency may be added in project.plugins.withType for Java or Android plugin
tasks.create(name: 'j2objcTranslate', type: TranslateTask,
dependsOn: 'j2objcCycleFinder') {
dependsOn: 'j2objcPreBuild') {
group 'build'
description "Translates all the java source files in to Objective-C using 'j2objc'"
additionalSrcFiles = files(
Expand All @@ -107,6 +96,16 @@ class J2objcPlugin implements Plugin<Project> {
srcGenDir = j2objcSrcGenDir
}

// j2objcCycleFinder is disabled by default as it's complex to use and understand.
// TODO: consider enabling by default if it's possible to make it easier to use.
// To enable the j2objcCycleFinder task, add the following to build.gradle:
// j2objcCycleFinder { enabled = true }
tasks.create(name: 'j2objcCycleFinder', type: CycleFinderTask,
dependsOn: 'j2objcPreBuild') {
group 'build'
description "Run the cycle_finder tool on all Java source files"
enabled false
}
// Note the '(debug|release)TestJ2objcExecutable' tasks are dynamically created by the Objective-C plugin.
// It is specified by the testJ2objc native component in NativeCompilation.groovy.
// TODO: copy and run debug and release tests within j2objcTestContent at the
Expand All @@ -128,7 +127,7 @@ class J2objcPlugin implements Plugin<Project> {
testBinaryFile = file("${buildDir}/binaries/testJ2objcExecutable/release/testJ2objc")
}
tasks.create(name: 'j2objcTest', type: DefaultTask,
dependsOn: ['j2objcTestDebug', 'j2objcTestRelease']) {
dependsOn: ['j2objcCycleFinder', 'j2objcTestDebug', 'j2objcTestRelease']) {
group 'build'
description "Marker task for all test tasks that take part in regular J2ObjC builds"
}
Expand Down