Apparently Gradle likes dependencies is under its root, for example:
Project |--build.gradle |--settings.gradle |--Dependency | |--build.gradleNow in most of my cases, I have my libraries as separate projects that I DO NOT want located under the app's root. So today, I finally got off my ass to figure out how to do that. (Yes, I've been very lazy about this)
The fix it turns out is rather simple. To achieve a directory structure like this:
Project |--build.gradle |--settings.gradle Dependency |--build.gradle
In the project/settings.gradle, add the following:
include ':Dependency' project(':Dependency').projectDir = new File(settingsDir, '../Dependency/module_build_gradle_location')If you've just finished an import, you can now manually delete the imported module and rebuild the project.
No comments:
Post a Comment