No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Failed to load latest commit information.
src fix handling of nested jars Apr 22, 2017
.gitignore remove eclipse-specific project files Apr 12, 2017
LICENSE initial version Mar 28, 2017 update version to 1.0 Apr 23, 2017
build.gradle update version to 1.0 Apr 23, 2017

Android Eclipse Generator

A Gradle plug-in that enables generation of Eclipse project files (.project and .classpath) to enable use of the Eclipse IDE for Android projects.

This generator works with the new Android build system.

Based on this stack overflow by Johannes Brodwall.

What It Does

This plug-in hooks into the Gradle eclipse plugin to make it work for Android projects, by doing the following:

  • Adds the following Android source paths:
    • src/main/java
    • build/generated/source/r/debug
    • build/generated/source/buildConfig/debug
    • build/generated/source/aidl/debug
  • For any dependency packaged as an aar (Android Archive), the aar is extracted into build/exploded-aars
    • each aar-packaged jar is added to the .classpath
  • Adds the Android SDK to the .classpath

How to Use

Add the following to your build.gradle:

apply plugin: 'com.greensopinion.gradle-android-eclipse'
apply plugin: 'eclipse'

buildscript {
    repositories {
        maven {
          url ""
    dependencies {
      classpath ""

eclipse {
  classpath {
    plusConfigurations += [ configurations.compile, configurations.testCompile ]
    downloadSources = true

See build.gradle for a complete working example.

Then from the command-line run:

$ gradle eclipse

When done, a .classpath and .project file should be in the current folder.


To open this project in Eclipse, first run the following:

$ gradle eclipse


Copyright 2017 David Green

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.