Logo Questions Linux Laravel Mysql Ubuntu Git Menu

How to make Android Studio use my build.gradle template for a new project?

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?

like image 987
jaumard Avatar asked Mar 17 '23 15:03


2 Answers

I have found that android studio does not use the templates from the sdk directory. I have found the template in :


you could try putting your gradle functions in here and android studio should pick them up for every new Android application project

like image 100
Andy Aspell-Clark Avatar answered Apr 07 '23 00:04

Andy Aspell-Clark

→ ~/../../sdk/tools/android create project 
--activity MainActivity 
--package com.example.android 
--target 3 
--path ~/AndroidStudioProjects/Example

to see details:

→ ~/../../sdk/tools/android -h
like image 20
DaVinci42 Avatar answered Apr 07 '23 02:04