Board logo

标题: 多人协作时gradle配置优化(2) [打印本页]

作者: look_w    时间: 2019-3-7 19:17     标题: 多人协作时gradle配置优化(2)

第三个为gradle工具自身的一些配置,如位置,发布地址等。内容如下:

    #Sat May 19 19:44:18 CST 2018
    distributionBase=GRADLE_USER_HOME
    distributionPath=wrapper/dists
    zipStoreBase=GRADLE_USER_HOME
    zipStorePath=wrapper/dists
    distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
     

该文件我们一般不会将它放到版本管理中

    第四个为项目混淆配置文件,一般在对外发布app时为了防止应用代码被破解会使用proguard工具将项目代码进行混淆处理。
    第五个为项目的属性配置文件,主要是对一些内置属性进行配置,如jvm参数等。内容如下:

    # Project-wide Gradle settings.
    # IDE (e.g. Android Studio) users:
    # Gradle settings configured through the IDE *will override*
    # any settings specified in this file.
    # For more details on how to configure your build environment visit
    # http://www.gradle.org/docs/curre ... ld_environment.html
    # Specifies the JVM arguments used for the daemon process.
    # The setting is particularly useful for tweaking memory settings.
    org.gradle.jvmargs=-Xmx1536m
    # When configured, Gradle will run in incubating parallel mode.
    # This option should only be used with decoupled projects. More details, visit
    # http://www.gradle.org/docs/curre ... :decoupled_projects
    # org.gradle.parallel=true
     

    第六个为项目的脚本配置文件,主要是在gradle构建的初始化阶段告诉gradle该项目包含多少个module。内容如下:

    include ':app'
     

    第七个为项目的属性配置文件,一般为android sdk的路径,ndk的路径等。内容如下:

    ## This file is automatically generated by Android Studio.
    # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
    #
    # This file should *NOT* be checked into Version Control Systems,
    # as it contains information specific to your local configuration.
    #
    # Location of the SDK. This is only used by Gradle.
    # For customization when using a Version Control System, please read the
    # header note.
    sdk.dir=C\:\\Users\\Administrator\\AppData\\Local\\Android\\Sdk




欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) Powered by Discuz! 7.0.0