Skip to content

gradle eclipse plugin with Android support ( to generate correct Eclipse . files) #148

Open

Description

@paulvi

What is possible with Eclipse is

.1. import the project as general project

.project

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
    <name>OpenSpritz-Android</name>
    <comment></comment>
    <projects>
    </projects>
    <buildSpec>
    </buildSpec>
    <natures>
    </natures>
</projectDescription>

import-android-gradle-as-general-project

.2. Put 2 Eclipse . file into modules into /OpenSpritz-Android/app/src/main and /OpenSpritz-Android/lib/src/main

add-eclipse-files

.project

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
    <name>OpenSpritz-Android-app</name>
    <comment></comment>
    <projects>
    </projects>
    <buildSpec>
        <buildCommand>
            <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>org.eclipse.jdt.core.javabuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>com.android.ide.eclipse.adt.ApkBuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
    </buildSpec>
    <natures>
        <nature>com.android.ide.eclipse.adt.AndroidNature</nature>
        <nature>org.eclipse.jdt.core.javanature</nature>
    </natures>
</projectDescription>

.classpath

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="src" path="java"/>
    <classpathentry kind="src" path="gen"/>
    <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
    <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
    <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
    <classpathentry kind="output" path="bin/classes"/>
</classpath>

.3. Import as Existing Android Code into Workspace

results

you can then browse code in familiar way, but
even after that you won't be able to run with Eclipse ADT.

.4.

But you can run build and tasks with gradle CLI or Nodeclipse/Enide Gradle for Eclipse

start

Activity

  1. paulvi commented on Apr 15, 2014

    @paulvi
    MemberAuthor

    SO Q at http://stackoverflow.com/questions/17470831/how-to-use-gradle-to-generate-eclipse-and-intellij-project-files-for-android-pro

    As answered in Issue 57668 by Android team (raised by @ArcOne)

    Project Member #2 x...@android.com

    The eclipse plugin is not compatible with the android plugin.

    You will not be able to import an Android gradle project into Eclipse using the default Gradle support in Eclipse.

    To make it work in Eclipse we will have to change the Gradle plugin for Eclipse, the same way we are modifying the Gradle support in IntelliJ

    That is Android team is working on gradle plugin for IntelliJ and gradle plugin for Eclipse needs to be updated too.

  2. changed the title [-]gradle eclipse plugin for Android or generate Eclipse . files[/-] [+]gradle eclipse plugin with Android support or generate Eclipse . files[/+] on Apr 15, 2014
  3. changed the title [-]gradle eclipse plugin with Android support or generate Eclipse . files[/-] [+]gradle eclipse plugin with Android support ( to generate correct Eclipse . files)[/+] on Apr 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions