mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 10:37:05 +05:30
build: apply gradle cache fix plugin
This commit is contained in:
parent
eb00c7b8c5
commit
a381d3d1ed
6 changed files with 28 additions and 3 deletions
|
@ -45,4 +45,7 @@ gradlePlugin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies { implementation(libs.build.agp) }
|
dependencies {
|
||||||
|
implementation(libs.build.agp)
|
||||||
|
implementation(libs.build.cachefix)
|
||||||
|
}
|
||||||
|
|
|
@ -2,14 +2,17 @@ package dev.msfjarvis.aps.gradle
|
||||||
|
|
||||||
import com.android.build.api.dsl.TestExtension
|
import com.android.build.api.dsl.TestExtension
|
||||||
import com.android.build.gradle.TestedExtension
|
import com.android.build.gradle.TestedExtension
|
||||||
|
import org.gradle.android.AndroidCacheFixPlugin
|
||||||
import org.gradle.api.JavaVersion
|
import org.gradle.api.JavaVersion
|
||||||
import org.gradle.api.Plugin
|
import org.gradle.api.Plugin
|
||||||
import org.gradle.api.Project
|
import org.gradle.api.Project
|
||||||
|
import org.gradle.kotlin.dsl.apply
|
||||||
import org.gradle.kotlin.dsl.findByType
|
import org.gradle.kotlin.dsl.findByType
|
||||||
|
|
||||||
@Suppress("UnstableApiUsage")
|
@Suppress("UnstableApiUsage")
|
||||||
class AndroidCommonPlugin : Plugin<Project> {
|
class AndroidCommonPlugin : Plugin<Project> {
|
||||||
override fun apply(project: Project) {
|
override fun apply(project: Project) {
|
||||||
|
project.pluginManager.apply(AndroidCacheFixPlugin::class)
|
||||||
project.extensions.findByType<TestedExtension>()?.run {
|
project.extensions.findByType<TestedExtension>()?.run {
|
||||||
setCompileSdkVersion(31)
|
setCompileSdkVersion(31)
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
|
|
|
@ -27,7 +27,11 @@ dependencyResolutionManagement {
|
||||||
}
|
}
|
||||||
exclusiveContent {
|
exclusiveContent {
|
||||||
forRepository(::gradlePluginPortal)
|
forRepository(::gradlePluginPortal)
|
||||||
filter { includeModule("com.github.ben-manes", "gradle-versions-plugin") }
|
filter {
|
||||||
|
includeModule("com.github.ben-manes", "gradle-versions-plugin")
|
||||||
|
includeModule("org.gradle.android.cache-fix", "org.gradle.android.cache-fix.gradle.plugin")
|
||||||
|
includeModule("gradle.plugin.org.gradle.android", "android-cache-fix-gradle-plugin")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,9 @@ org.gradle.caching=true
|
||||||
# Enable filesystem watching
|
# Enable filesystem watching
|
||||||
org.gradle.vfs.watch=true
|
org.gradle.vfs.watch=true
|
||||||
|
|
||||||
|
# Disable cache-fix version warning
|
||||||
|
org.gradle.android.cache-fix.ignoreVersionCheck=true
|
||||||
|
|
||||||
# Enable experimental configuration caching
|
# Enable experimental configuration caching
|
||||||
org.gradle.unsafe.configuration-cache=true
|
org.gradle.unsafe.configuration-cache=true
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,7 @@ aurora-component = { module = "org.pushing-pixels:aurora-component", version.ref
|
||||||
aurora-theming = { module = "org.pushing-pixels:aurora-theming", version.ref = "aurora" }
|
aurora-theming = { module = "org.pushing-pixels:aurora-theming", version.ref = "aurora" }
|
||||||
aurora-window = { module = "org.pushing-pixels:aurora-window", version.ref = "aurora" }
|
aurora-window = { module = "org.pushing-pixels:aurora-window", version.ref = "aurora" }
|
||||||
build-agp = { module = "com.android.tools.build:gradle", version.ref = "agp" }
|
build-agp = { module = "com.android.tools.build:gradle", version.ref = "agp" }
|
||||||
|
build-cachefix = "org.gradle.android.cache-fix:org.gradle.android.cache-fix.gradle.plugin:2.5.5"
|
||||||
build-kotlin-gradle = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
|
build-kotlin-gradle = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
|
||||||
build-kotlin-serialization = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlin" }
|
build-kotlin-serialization = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlin" }
|
||||||
build-spotless = "com.diffplug.spotless:spotless-plugin-gradle:6.7.2"
|
build-spotless = "com.diffplug.spotless:spotless-plugin-gradle:6.7.2"
|
||||||
|
|
|
@ -26,7 +26,11 @@ pluginManagement {
|
||||||
}
|
}
|
||||||
exclusiveContent {
|
exclusiveContent {
|
||||||
forRepository(::gradlePluginPortal)
|
forRepository(::gradlePluginPortal)
|
||||||
filter { includeModule("com.github.ben-manes", "gradle-versions-plugin") }
|
filter {
|
||||||
|
includeModule("com.github.ben-manes", "gradle-versions-plugin")
|
||||||
|
includeModule("org.gradle.android.cache-fix", "org.gradle.android.cache-fix.gradle.plugin")
|
||||||
|
includeModule("gradle.plugin.org.gradle.android", "android-cache-fix-gradle-plugin")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
includeBuild("build-logic")
|
includeBuild("build-logic")
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
@ -63,6 +67,13 @@ dependencyResolutionManagement {
|
||||||
includeGroup("org.jetbrains.skiko")
|
includeGroup("org.jetbrains.skiko")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
exclusiveContent {
|
||||||
|
forRepository(::gradlePluginPortal)
|
||||||
|
filter {
|
||||||
|
includeModule("org.gradle.android.cache-fix", "org.gradle.android.cache-fix.gradle.plugin")
|
||||||
|
includeModule("gradle.plugin.org.gradle.android", "android-cache-fix-gradle-plugin")
|
||||||
|
}
|
||||||
|
}
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue