ceylon / ceylon-gradle-android

Ceylon Gradle plugin for Android
Apache License 2.0
9 stars 2 forks source link

Build does not work with both Java and Ceylon activities #5

Closed bjansen closed 8 years ago

bjansen commented 8 years ago

When I create a new project and add support for Ceylon in the new module, it now generates a new Ceylon activity in the same package as the default Java activity, but located in another source root. When I build the project, I get strange errors:

/Users/bastien/AndroidStudioProjects/MyApplication6/app/src/main/java/com/example/bastien/myapplication/MainActivity.java:11: error: package R does not exist
        setContentView(R.layout.activity_main);
                        ^
1 error

then

Note: Visiting transitive dependencies for com.android.support.support-v4.internal_impl/23.2.1
    shared com.android.support.animated-vector-drawable/23.2.1 ... [OK]
Modules containing the following packages need to be declared as imports:
(Tip: try running again with the '--show-suggestions' option)
    android.support.v7.appcompat
ceylon import-jar: Problems were found, aborting.
:app:compileDebugCeylonWithCeylonc FAILED

FAILURE: Build completed with 2 failures.

Removing the Java file solves the problem.

FroMage commented 8 years ago

I have a fix ready, finally. Will push Monday.

FroMage commented 8 years ago

Done, except the Ceylon IntelliJ plugin doesn't support this yet.