Skip to content

Commit

Permalink
Merge pull request #338 from brunobowden/update
Browse files Browse the repository at this point in the history
j2objcCycleFinder as j2objcTest dependency instead of j2objcTranslate
  • Loading branch information
brunobowden committed Aug 2, 2015
2 parents 4a48ad8 + 3d6862c commit 9be0aac
Showing 1 changed file with 12 additions and 13 deletions.
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

0 comments on commit 9be0aac

Please sign in to comment.