Build with eclipse or netbeans

I built the project with the instructions guide, but I could not build it with netbeans or eclipse IDE, Is there any instruction guide for it?

Ok lets see if I can provide build instructions for the .jar using Eclipse. Installer creation is a separate topic and vastly depends on the target OS.

Requirements

Cloning source files

  • Get the Cryptomator sources from GitHub (use the green “clone or download” button on the top right)

Setting up Eclipse

  1. Click File, Import… and choose “Existing Maven Projects”:

  2. Select all modules found inside the cloned sources:

  3. Run Maven install on the “main” project once:

  4. Refresh the file tree (F5), so you can see the built files under the target dir. Then add target/generated-sources/annotations and optionally target/generated-test-source/annotations to the build path. Repeat this step for each module that has generated sources:

  5. Refresh the maven project (Alt+F5). It should now be compile-clean.

1 Like

thanks,

Instead of Eclipse Mars 2, I use Eclipse Neon 3,

I did the instructions, all the things are alright, but in the class generated by Dagger called: “DaggerLauncherComponent” bellow lines could not be solved!

this.upgradeVersion3DropBundleExtensionProvider =
        DoubleCheck.provider(
            UpgradeVersion3DropBundleExtension_Factory.create(
                ((MembersInjector) MembersInjectors.noOp()), localizationProvider));

    this.upgradeVersion3to4Provider =
        DoubleCheck.provider(
            UpgradeVersion3to4_Factory.create(
                ((MembersInjector) MembersInjectors.noOp()), localizationProvider));

    this.upgradeVersion4to5Provider =
        DoubleCheck.provider(
            UpgradeVersion4to5_Factory.create(
                ((MembersInjector) MembersInjectors.noOp()), localizationProvider));

    this.upgradeVersion5toXProvider =
        DoubleCheck.provider(
            UpgradeVersion5toX_Factory.create(
                ((MembersInjector) MembersInjectors.noOp()), localizationProvider));

    this.upgradeStrategiesProvider =
        DoubleCheck.provider(
            UpgradeStrategies_Factory.create(
                upgradeVersion3DropBundleExtensionProvider,
                upgradeVersion3to4Provider,
                upgradeVersion4to5Provider,
                upgradeVersion5toXProvider));

and all the problems are with DoubleCheck.provider!!!
Only these lines have problem with this provider, and other provider in the class do not have any problem,

The error is :
The method provider (Provider ) in the type DoubleCheck is not applicable for the arguments(Factory)

Would you please guide me how to fix it?

This is a compiler bug in the latest Eclipse versions. Mars.2 is the last version still behaving correctly. Factory extends Provider but isn’t accepted by DoubleCheck.provider(Provider delegate) because the Eclipse compiler is apparently confused when assigning the result to a raw type.

Maven and javac are able to compile this. As this is (correctly) generated code, there is no way to fix this, other than:

  1. waiting for Google to fix Dagger (i.e. by adding explicit type casts in the generated code)
  2. waiting for Eclipse to fix its compiler
  3. using Eclipse Mars.2