Skip to content

Commit 8e4a3b0

Browse files
committed
Add a compileSkip analogous to testSkip.
1 parent c537610 commit 8e4a3b0

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

j2objc.gradle

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,8 @@ class J2objcPluginExtension {
198198

199199

200200
// COMPILE
201+
// Skip compile task if true
202+
boolean compileSkip = false
201203
// Flags copied verbatim to j2objcc command
202204
// J2objc default libraries
203205
String compileFlags = "-ObjC -lguava -ljavax_inject -ljre_emul -ljsr305 -ljunit -lmockito"
@@ -761,7 +763,10 @@ class J2objcCompileTask extends DefaultTask {
761763

762764
@TaskAction
763765
def compile() {
764-
766+
if (project.j2objcConfig.compileSkip) {
767+
logger.debug "Skipping j2objcCompile"
768+
return
769+
}
765770
if (J2objcUtils.isWindows()) {
766771
throw new InvalidUserDataException(
767772
"Windows only supports j2objc translation. To compile and test code, " +
@@ -804,7 +809,7 @@ class J2objcTestTask extends DefaultTask {
804809
@TaskAction
805810
def test() {
806811

807-
if (project.j2objcConfig.testSkip) {
812+
if (project.j2objcConfig.testSkip) {
808813
logger.debug "Skipping j2objcTest"
809814
return
810815
}

0 commit comments

Comments
 (0)