-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compatibility with Android projects #49
Comments
Hey Matthias, thanks for giving Decycle a try. 😀 Could you do me a favor (since I don't have any experience with Android development)?
After that you should be able to use |
The Decycle gradle plugin no longer automatically applies the java plugin. This should be done by the project that uses Decycle. This provides compatibility with projects that use Android plugins. Fixes #49
Thank you for the swift response! I will clone the repo and test via composite build whether there are any other required changes. |
By the way, just check out the branch "issue/no-default-java-plugin", then you don't have to modify the code yourself. |
The changes in your branch at least prevent any conflicts while applying the plugin, but there's another problem: |
Could you possibly provide a minimal gradle build file (or project), so that I can debug this myself? |
The project I tested with was basically just the default new project created by Android studio. If you want, I can still zip that for you but it's probably faster to just create a new Android studio project on your own. |
The Decycle gradle plugin no longer automatically applies the java plugin. This should be done by the project that uses Decycle. This provides compatibility with projects that use Android plugins. Fixes #49
Add experimental support for android source sets Fixes #49
The Decycle gradle plugin no longer automatically applies the java plugin. This should be done by the project that uses Decycle. This provides compatibility with projects that use Android plugins. Fixes #49
Add experimental support for android source sets Fixes #49
Hi Matthias, sorry for the delay. I finally got the time to dig a little bit into the android plugin details. I think I made some progress, however I would like to discuss this with someone having more android development knowledge than me. The first thing I did was to examine the android source sets: project.android.sourceSets.forEach { println(it.name) } This results in this list:
However, unlike in the java plugin, there are no separate directories/folders for each of these source sets. The IDE (Android Studio) has for a new project only Since decycle works on the bytecode, i.e. on the compiled classes, it most likely doesn't make much sense to analyze both If you checkout the current The question is how we can map this simply to What I can think of is to hard-wire What do you think, @nightm4re94 ? |
Sorry for taking this long with my response! |
First of all, thanks for this amazing tool! My eternal search for a jvm cycle detection tool that hasn't been outdated and abandoned for years and integrates with Gradle has finally found an end 😄
Now I have tried applying the Gradle plugin to an Android project, and unfortunately the java plugin applied in decycle is incompatible with the Android plugins.
Since the lifecycle of Java and Android projects is rather similar, I was wondering: Would it be possible to remove the explicit application of the java plugin in favor of letting the user do that beforehand? From experience, every Java module has the java plugin applied explicitly anyway, so there is a bit of redundancy in the configuration.
The text was updated successfully, but these errors were encountered: