【问题标题】:Can Gradle compile option affect on multi module automatically?(dexOptions,aaptOptions,lintOptions)Gradle 编译选项可以自动影响多模块吗?(dexOptions,aaptOptions,lintOptions)
【发布时间】:2019-05-09 01:24:23
【问题描述】:

首先,我在主模块(:app)上设置了完整版的Gradle设置,其他模块是:核心,常量,反馈......等

Gradle 构建运行时,标题中提到的所有设置都会应用到其他模块(从:app,到:core,constant,feedback...)

Androidstudio 版本:3.4 Gradle 依赖版本:“com.android.tools.build:gradle:3.3.2”

lintOptions {
        checkReleaseBuilds false
        // Or, if you prefer, you can continue to check for errors in release builds,
        // but continue the build even when errors are found:
        abortOnError false
    }

    kapt {
        useBuildCache = true
    }

    dexOptions {
        dexInProcess true
        preDexLibraries true
        maxProcessCount 15
    }

aaptOptions { 
        cruncherEnabled = enableCruncher()
        cruncherProcesses = 0
    }

    compileOptions{
        incremental = true  
    }

【问题讨论】:

    标签: android gradle android-gradle-plugin


    【解决方案1】:

    肯尼斯,

    您必须申请单独的模块。

    lintoptionsapptOptionskaptdexOptions 等选项在 android 块下定义,该块仅在模块级 build.gradle 中可用

    android {
    
          lintOptions {
    
          }
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-08-03
      • 2017-09-08
      • 1970-01-01
      • 1970-01-01
      • 2012-09-29
      • 2012-07-05
      相关资源
      最近更新 更多