Reputation: 1869
I'm trying to move my current android project to a Gradle project, so here what I've done so far:
build.gradle
fileANDROID_HOME
environment variable in Windows 7gradlew build
So now, I've got a new folders structure in my project:
It's my first time with gradle, I guess I missed something and I would like to know if to finish this migration I have to delete the src and res directories (in blue) ? For me I just have to get a new structure of folders after the generation of gradleview build.. And if what I've generated looks like to a gradle project ?
Upvotes: 1
Views: 2860
Reputation: 63892
There was typo: use gradlew build
or gradle build
You can keep Eclipse folder structure and configure it in build.gradle
Yet I would recommend to move source into src/main/java
.
Eclipse would be quite OK with that.
Upvotes: 0
Reputation: 2713
If your project structure does not fit to android studios structure you can add your folders to the source set in the gradle file of your app. So your android studio will match the correct folders
http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Project-Structure
sourceSets {
main {
// manifest.srcFile 'src/main/AndroidManifest.xml'
// java.srcDirs = ['src/main/java', 'build/generated/source/apt/${variant.dirName}']
// resources.srcDirs = ['src/main/resources']
// res.srcDirs = ['src/main/res']
// assets.srcDirs = ['src/main/assets']
}
}
as copied from here
Upvotes: 1