简体   繁体   中英

exporting gradle project as normal android studio

I have downloaded an open source project from git hub and it was build using gradle. So while adding that android studio I added the grade, it downloaded the dependencies etc etc (was an hectic and time consuming task). Now the app is running fine on my Android Studio I want to pass this project to one of my colleague. Is there any option that my colleague dont have to go through all the hassle of downloading dependencies that gradle does (using gradle.build). Can I export it as normal Android Studio project and later on import it just using Import Existing Android Studio project option ?

As I understand, it takes a while to download all your project dependencies, so one option that you should keep in mind if you want to avoid this kind of problems to your colleagues just save your project dependencies to a specific folder inside your project so your colleagues could easily resolved.

You can achieve that adding this line at the end of your build.gradle :

task copyToLib(type: Copy) {
    into "$buildDir/output/lib"
    from configurations.runtime
}
build.dependsOn copyToLib

So when you finish solving your dependencies they will be at specific folder

For more info read this http://forums.gradle.org/gradle/topics/how_can_i_gather_all_my_projects_dependencies_into_a_folder

Hope it helps!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM