mirror of
https://github.com/divkit/divkit.git
synced 2026-05-07 20:02:32 +00:00
Enable configuration cache by default
commit_hash:26a898b2d11e9204c99540beb0741917610ab09d
This commit is contained in:
@@ -139,14 +139,16 @@ apiValidation {
|
||||
}
|
||||
|
||||
tasks.register('reportVersion') {
|
||||
def version = divkitVersion.releaseLibraryVersion
|
||||
doLast {
|
||||
println "DivKit version ${divkitVersion.releaseLibraryVersion}"
|
||||
println "DivKit version $version"
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register('reportBuildNumber') {
|
||||
def version = divkitVersion.releaseLibraryVersion
|
||||
doLast {
|
||||
println "buildNumber ${divkitVersion.releaseLibraryVersion}"
|
||||
println "buildNumber $version"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.yandex.div.gradle
|
||||
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.publish.maven.tasks.AbstractPublishToMaven
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Date
|
||||
|
||||
@@ -9,14 +11,23 @@ enum class PublicationType {
|
||||
|
||||
dev {
|
||||
override fun getVersionSuffix() = "-dev.${VERSION_DATE_FORMAT.format(Date())}"
|
||||
override fun configureForProject(project: Project) {
|
||||
project.tasks.withType(AbstractPublishToMaven::class.java).configureEach { task ->
|
||||
task.notCompatibleWithConfigurationCache("publicationType dev is not compatible " +
|
||||
"with configuration cache as it uses build start timestamp")
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
release {
|
||||
override fun getVersionSuffix() = ""
|
||||
override fun configureForProject(project: Project) = Unit
|
||||
};
|
||||
|
||||
abstract fun getVersionSuffix(): String
|
||||
|
||||
abstract fun configureForProject(project: Project)
|
||||
|
||||
companion object {
|
||||
|
||||
@JvmStatic
|
||||
|
||||
@@ -36,6 +36,12 @@ android {
|
||||
if (!project.hasProperty("include-regression-tests")) {
|
||||
testInstrumentationRunnerArguments.notAnnotation = "com.yandex.alicekit.uitests.annotations.Regression"
|
||||
}
|
||||
if (project.hasProperty("shardIndex")) {
|
||||
testInstrumentationRunnerArguments.shardIndex = project.property("shardIndex")
|
||||
}
|
||||
if (project.hasProperty("numShards")) {
|
||||
testInstrumentationRunnerArguments.numShards = project.property("numShards")
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
|
||||
@@ -1,13 +1,3 @@
|
||||
def connectedTestTaskName = "connectedDebugAndroidTest" // encapsulating test variant
|
||||
|
||||
tasks.register('runUiTests') {
|
||||
if (!project.hasProperty("runsNumber")) {
|
||||
dependsOn connectedTestTaskName
|
||||
} else {
|
||||
doLast { // couldn't make rerun task several times with gradle, use python
|
||||
runsNumber = project.properties["runsNumber"] as Integer
|
||||
def runScript = "$projectDir.parent/scripts/ui-tests/run-several-times.py"
|
||||
executeWithTimeout("python $runScript $runsNumber ${getStartArgs()}", 60)
|
||||
}
|
||||
}
|
||||
dependsOn "connectedDebugAndroidTest" // encapsulating test variant
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
org.gradle.parallel=true
|
||||
org.gradle.daemon=true
|
||||
org.gradle.vfs.watch=true
|
||||
org.gradle.configuration-cache=true
|
||||
|
||||
testVariant = debug
|
||||
|
||||
|
||||
@@ -12,17 +12,10 @@ ext {
|
||||
signingKeyId = rootProject.findProperty("signingKeyId")
|
||||
signingPassword = rootProject.findProperty("signingPassword")
|
||||
signingSecretKeyRingFile = rootProject.findProperty("signingSecretKeyRingFile")
|
||||
|
||||
commitHash = { ->
|
||||
def stdout = new ByteArrayOutputStream()
|
||||
exec {
|
||||
commandLine 'arc', 'rev-parse', 'HEAD'
|
||||
standardOutput = stdout
|
||||
}
|
||||
return stdout.toString().trim()
|
||||
}
|
||||
}
|
||||
|
||||
publicationType.configureForProject(project)
|
||||
|
||||
def publishToMavenCentral = rootProject.ext.has("publishToMavenCentral")
|
||||
&& rootProject.ext.publishToMavenCentral
|
||||
&& !projectDir.path.contains("internal/android/libs")
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import com.yandex.div.gradle.Version
|
||||
|
||||
def fullVersion = project.file('./../../version').text
|
||||
def versionFile = project.layout.projectDirectory.file('./../../version')
|
||||
def fullVersion = project.providers.fileContents(versionFile).asText.get()
|
||||
|
||||
def (major, minor, patch) = fullVersion.split('\\.')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user