mirror of
https://github.com/bitwarden/android.git
synced 2026-02-03 18:17:54 -06:00
Update build optimizations
This commit is contained in:
parent
92ba38c831
commit
ba2eda1ad1
@ -299,18 +299,6 @@ dependencies {
|
||||
testImplementation(libs.square.turbine)
|
||||
}
|
||||
|
||||
tasks.withType<Test>().configureEach {
|
||||
useJUnitPlatform()
|
||||
@Suppress("MagicNumber")
|
||||
forkEvery = 100
|
||||
maxHeapSize = "2g"
|
||||
maxParallelForks = (Runtime.getRuntime().availableProcessors() / 2).coerceAtLeast(1)
|
||||
jvmArgs = jvmArgs.orEmpty() + "-XX:+UseParallelGC" +
|
||||
// Explicitly setting the user Country and Language because tests assume en-US
|
||||
"-Duser.country=US" +
|
||||
"-Duser.language=en"
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
// Disable Fdroid-specific tasks that we want to exclude
|
||||
val fdroidTasksToDisable = tasks.withType<GoogleServicesTask>() +
|
||||
|
||||
@ -260,18 +260,6 @@ protobuf {
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<Test>().configureEach {
|
||||
useJUnitPlatform()
|
||||
@Suppress("MagicNumber")
|
||||
forkEvery = 100
|
||||
maxHeapSize = "2g"
|
||||
maxParallelForks = (Runtime.getRuntime().availableProcessors() / 2).coerceAtLeast(1)
|
||||
jvmArgs = jvmArgs.orEmpty() + "-XX:+UseParallelGC" +
|
||||
// Explicitly setting the user Country and Language because tests assume en-US
|
||||
"-Duser.country=US" +
|
||||
"-Duser.language=en"
|
||||
}
|
||||
|
||||
private fun renameFile(path: String, newName: String) {
|
||||
val originalFile = File(path)
|
||||
if (!originalFile.exists()) {
|
||||
|
||||
@ -75,15 +75,3 @@ dependencies {
|
||||
testImplementation(libs.mockk.mockk)
|
||||
testImplementation(libs.square.turbine)
|
||||
}
|
||||
|
||||
tasks.withType<Test>().configureEach {
|
||||
useJUnitPlatform()
|
||||
@Suppress("MagicNumber")
|
||||
forkEvery = 100
|
||||
maxHeapSize = "2g"
|
||||
maxParallelForks = (Runtime.getRuntime().availableProcessors() / 2).coerceAtLeast(1)
|
||||
jvmArgs = jvmArgs.orEmpty() + "-XX:+UseParallelGC" +
|
||||
// Explicitly setting the user Country and Language because tests assume en-US
|
||||
"-Duser.country=US" +
|
||||
"-Duser.language=en"
|
||||
}
|
||||
|
||||
@ -183,6 +183,18 @@ subprojects {
|
||||
tasks.withType<JavaCompile>().configureEach {
|
||||
options.isFork = true
|
||||
}
|
||||
tasks.withType<Test>().configureEach {
|
||||
useJUnitPlatform()
|
||||
@Suppress("MagicNumber")
|
||||
forkEvery = 500
|
||||
maxHeapSize = "2g"
|
||||
maxParallelForks = (Runtime.getRuntime().availableProcessors() / 2).coerceAtLeast(1)
|
||||
@Suppress("UselessCallOnNotNull")
|
||||
jvmArgs = jvmArgs.orEmpty() + "-XX:+UseParallelGC" +
|
||||
// Explicitly setting the user Country and Language because tests assume en-US
|
||||
"-Duser.country=US" +
|
||||
"-Duser.language=en"
|
||||
}
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
|
||||
@ -68,15 +68,3 @@ kotlin {
|
||||
jvmTarget = JvmTarget.fromTarget(libs.versions.jvmTarget.get())
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<Test>().configureEach {
|
||||
useJUnitPlatform()
|
||||
@Suppress("MagicNumber")
|
||||
forkEvery = 100
|
||||
maxHeapSize = "2g"
|
||||
maxParallelForks = (Runtime.getRuntime().availableProcessors() / 2).coerceAtLeast(1)
|
||||
jvmArgs = jvmArgs.orEmpty() + "-XX:+UseParallelGC" +
|
||||
// Explicitly setting the user Country and Language because tests assume en-US
|
||||
"-Duser.country=US" +
|
||||
"-Duser.language=en"
|
||||
}
|
||||
|
||||
@ -63,15 +63,3 @@ dependencies {
|
||||
testImplementation(libs.kotlinx.coroutines.test)
|
||||
testImplementation(libs.mockk.mockk)
|
||||
}
|
||||
|
||||
tasks.withType<Test>().configureEach {
|
||||
useJUnitPlatform()
|
||||
@Suppress("MagicNumber")
|
||||
forkEvery = 100
|
||||
maxHeapSize = "2g"
|
||||
maxParallelForks = (Runtime.getRuntime().availableProcessors() / 2).coerceAtLeast(1)
|
||||
jvmArgs = jvmArgs.orEmpty() + "-XX:+UseParallelGC" +
|
||||
// Explicitly setting the user Country and Language because tests assume en-US
|
||||
"-Duser.country=US" +
|
||||
"-Duser.language=en"
|
||||
}
|
||||
|
||||
@ -73,15 +73,3 @@ dependencies {
|
||||
testFixturesImplementation(libs.junit.jupiter)
|
||||
testFixturesImplementation(libs.kotlinx.coroutines.test)
|
||||
}
|
||||
|
||||
tasks.withType<Test>().configureEach {
|
||||
useJUnitPlatform()
|
||||
@Suppress("MagicNumber")
|
||||
forkEvery = 100
|
||||
maxHeapSize = "2g"
|
||||
maxParallelForks = (Runtime.getRuntime().availableProcessors() / 2).coerceAtLeast(1)
|
||||
jvmArgs = jvmArgs.orEmpty() + "-XX:+UseParallelGC" +
|
||||
// Explicitly setting the user Country and Language because tests assume en-US
|
||||
"-Duser.country=US" +
|
||||
"-Duser.language=en"
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@ org.gradle.caching=true
|
||||
org.gradle.configuration-cache=true
|
||||
org.gradle.configuration-cache.parallel=true
|
||||
org.gradle.configuration-cache.problems=warn
|
||||
org.gradle.jvmargs=-Xmx4g -XX:+UseParallelGC -Dfile.encoding=UTF-8
|
||||
org.gradle.jvmargs=-Xmx4g -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParallelGC -Dfile.encoding=UTF-8
|
||||
org.gradle.parallel=true
|
||||
|
||||
# Disable build features that are enabled by default and we do not need
|
||||
|
||||
@ -78,15 +78,3 @@ dependencies {
|
||||
testFixturesImplementation(libs.square.retrofit.kotlinx.serialization)
|
||||
testFixturesImplementation(libs.square.okhttp.mockwebserver)
|
||||
}
|
||||
|
||||
tasks.withType<Test>().configureEach {
|
||||
useJUnitPlatform()
|
||||
@Suppress("MagicNumber")
|
||||
forkEvery = 100
|
||||
maxHeapSize = "2g"
|
||||
maxParallelForks = (Runtime.getRuntime().availableProcessors() / 2).coerceAtLeast(1)
|
||||
jvmArgs = jvmArgs.orEmpty() + "-XX:+UseParallelGC" +
|
||||
// Explicitly setting the user Country and Language because tests assume en-US
|
||||
"-Duser.country=US" +
|
||||
"-Duser.language=en"
|
||||
}
|
||||
|
||||
@ -117,15 +117,3 @@ dependencies {
|
||||
|
||||
testImplementation(testFixtures(project(":ui")))
|
||||
}
|
||||
|
||||
tasks.withType<Test>().configureEach {
|
||||
useJUnitPlatform()
|
||||
@Suppress("MagicNumber")
|
||||
forkEvery = 100
|
||||
maxHeapSize = "2g"
|
||||
maxParallelForks = (Runtime.getRuntime().availableProcessors() / 2).coerceAtLeast(1)
|
||||
jvmArgs = jvmArgs.orEmpty() + "-XX:+UseParallelGC" +
|
||||
// Explicitly setting the user Country and Language because tests assume en-US
|
||||
"-Duser.country=US" +
|
||||
"-Duser.language=en"
|
||||
}
|
||||
|
||||
@ -115,14 +115,5 @@ kotlin {
|
||||
}
|
||||
|
||||
tasks.withType<Test>().configureEach {
|
||||
useJUnitPlatform()
|
||||
@Suppress("MagicNumber")
|
||||
forkEvery = 100
|
||||
maxHeapSize = "2g"
|
||||
maxParallelForks = (Runtime.getRuntime().availableProcessors() / 2).coerceAtLeast(1)
|
||||
jvmArgs = jvmArgs.orEmpty() + "-XX:+UseParallelGC" +
|
||||
// Explicitly setting the user Country and Language because tests assume en-US
|
||||
"-Duser.country=US" +
|
||||
"-Duser.language=en"
|
||||
android.sourceSets["main"].res.srcDirs("src/test/res")
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user