I make a build.gradle to increment prod version code on release build and some other config that I want for all my futur projects, is there a way to tell Android Studio (or intelliJ) to use my build.gradle for all new project I create ? Or maybe is there a template use by IDE for gradle file I can modify?
I have found that android studio does not use the templates from the sdk directory. I have found the template in :
<android-studio>/plugins/android/lib/templates/gradle-projects/NewAndroidProject/root/build.gradle.ftl
you could try putting your gradle functions in here and android studio should pick them up for every new Android application project
→ ~/../../sdk/tools/android create project
--activity MainActivity
--package com.example.android
--target 3
--path ~/AndroidStudioProjects/Example
--gradle YOUR_GRADLE_TEMLATE_PATH
to see details:
→ ~/../../sdk/tools/android -h
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With