Is it possible to generate Eclipse and Intellij project files for Android projects using Gradle?
In maven we would do mvn eclipse:eclipse
and in PlayFramework we would do play eclipsify
. Does Gradle have this feature for Android projects?
I have installed Gradle (1.6) and Android SDK Manager (22.0.1) explained here
This is my build.gradle file:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.0'
}
}
apply plugin: 'android'
apply plugin: 'eclipse'
sourceCompatibility = 1.7
version = '1.0.2'
repositories {
mavenCentral()
}
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
}
android {
buildToolsVersion "17"
compileSdkVersion 8
defaultConfig {
versionCode 1
versionName "1.0"
minSdkVersion 7
targetSdkVersion 8
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
instrumentTest.setRoot('tests')
}
}
And then I run the command:
gradle clean build cleanEclipse eclipse
It builds just fine, but when I import the project into Eclipse it looks like a normal java project.
Anyone know how to get Gradle to create Android specific Eclipse project files?
Is this a prioritized feature by Gradle?
-- UPDATE --
I do believe this is an issue. So I have posted it to the Android Tools team issue #57668. Please star it for them to prioritize the issue :)
-- UPDATE --
It does not look like the Android Tools team are looking into this issue. So for now I have converted to Android Studio where I'm able to import my gradle project with dependencies via the IDE.