How to define common android properties for all modules using gradle

前端 未结 8 2058
走了就别回头了
走了就别回头了 2020-12-04 14:20

I create a simple project in AndroidStudio with a few modules. Each module\'s gradle script contains the following code:

android {
    compileSdkVersion 18
          


        
8条回答
  •  感情败类
    2020-12-04 14:49

    In build.gradle of main project you should write something like next:

    project.extensions.add("buildToolsVersion", "19.0.3")
    

    In subproject you can use this extensions:

    buildToolsVersion rootProject.buildToolsVersion
    

    More info you can find here

提交回复
热议问题