提交 dce044e2 编写于 作者: J johnsonlee

Disable incremental build and build cache when transform verification has been enabled

上级 6f3e1e5c
......@@ -23,6 +23,8 @@ open class BoosterTransform(val project: Project) : Transform() {
it.javaClass.getAnnotation(Priority::class.java)?.value ?: 0
}
internal val verifyEnabled = project.getProperty(OPT_TRANSFORM_VERIFY, false)
private val android: BaseExtension = project.getAndroid()
private lateinit var androidKlassPool: AbstractKlassPool
......@@ -38,9 +40,9 @@ open class BoosterTransform(val project: Project) : Transform() {
override fun getName() = "booster"
override fun isIncremental() = true
override fun isIncremental() = !verifyEnabled
override fun isCacheable() = true
override fun isCacheable() = !verifyEnabled
override fun getInputTypes(): MutableSet<QualifiedContent.ContentType> = TransformManager.CONTENT_CLASS
......@@ -74,3 +76,8 @@ open class BoosterTransform(val project: Project) : Transform() {
}
}
/**
* The option for transform outputs verifying, default is false
*/
private const val OPT_TRANSFORM_VERIFY = "booster.transform.verify"
......@@ -108,7 +108,7 @@ internal class BoosterTransformInvocation(
this.onPostTransform()
if (project.getProperty(OPT_TRANSFORM_VERIFY, false)) {
if (transform.verifyEnabled) {
this.doVerify()
}
}
......@@ -221,8 +221,3 @@ internal class BoosterTransformInvocation(
}
}
}
/**
* The option for transform outputs verifying, default is false
*/
private const val OPT_TRANSFORM_VERIFY = "booster.transform.verify"
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册