Skip/Exclude compilation check of directory which just holds actual project?

Project structure like this:

--workspace
   --project_main                           (contain sources to be compiled)
   --project_dep_1                          (contain sources to be compiled)
   --dir_for_3rdparty_libraries             (contain sub-projects, nothing to compile)
      --3rdparty_lib_1                      (contain sources to be compiled)
      --3rdparty_lib_2                      (contain sources to be compiled)

I have build.gradle inside every directory of the structure showed upside except dir_for_3rdparty_libraries, inside workspace also contains settings.gradle to specify projects related:

include "project_main", "project_dep_1", "dir_for_3rdparty_libraries:3rdparty_lib_1", "dir_for_3rdparty_libraries:3rdparty_lib_2"

and the build.gradle for workspace holds subprojects's universal settings,every other just sets type=swc/swf and dependencies.

Every time when I do gradle build inside the dir workspace, error occurs:

...
* What went wrong:
A problem occurred configuring project ':dir_for_3rdparty_libraries'.
> Failed to notify project evaluation listener.
   > Error:
[The 'type' property hasn't been specified! This property is required. Possible
values are: [swf, swc, swcAir, air, mobile]]
   > Cannot get property 'configName' on null object
...

Directory dir_for_3rdparty_libraries actual does not need to be compiled,because there are nothing to be compiled,so how to work around this?

  1. When you use "dir_for_3rdparty_libraries:3rdparty_lib_1", you basically ask Gradle to include a project named "dir_for_3rdparty_libraries", and a subproject thereof named "3rdparty_lib_1".
    If you only want to include the subproject(s), then use "dir_for_3rdparty_libraries/3rdparty_lib_1"

  2. Thanks for the quick and right response, another problem:

    [Frame(factoryClass="Bootstrap")]
    public class Main extends Sprite { ... }
    
    The Bootstrap class is not compiled, how to handle this?
    (The Bootstrap class imports a lot other classes)
  3. I have no idea about that one. Seems like you are maybe missing a compiler option to include that Bootstrap class? Compiler options can be specified in GradleFx with the 'additionalCompilerOptions' property.

  4. My question is how to compile embeded Preloader, and suggestion by Yennick Trevels is quite right, yet it really tricks:

    mainClass = "Bootstrap"
    
    additionalCompilerOptions = [
        "-frame", 
        "AnyLabelNameHere", 
        "Main"
    ]
    

    Makes Bootstrap the first frame and the Main class the second frame, works fine.

Reply to this discussion Internal reply only staff will see it

Markdown

Attaching KB article:

» »

Read more…

Attach files

Up to 10MB each.

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac