Add build-plugin
This commit is contained in:
parent
a3819fd102
commit
557bf1dcc7
4 changed files with 40 additions and 0 deletions
11
build-plugin/build.gradle.kts
Normal file
11
build-plugin/build.gradle.kts
Normal file
|
@ -0,0 +1,11 @@
|
|||
plugins {
|
||||
`kotlin-dsl`
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
|
||||
}
|
||||
|
||||
fun plugin(provider: Provider<PluginDependency>) = with(provider.get()) {
|
||||
"$pluginId:$pluginId.gradle.plugin:$version"
|
||||
}
|
21
build-plugin/settings.gradle.kts
Normal file
21
build-plugin/settings.gradle.kts
Normal file
|
@ -0,0 +1,21 @@
|
|||
pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
dependencyResolutionManagement {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
|
||||
versionCatalogs.create("libs") {
|
||||
from(files("../gradle/libs.versions.toml"))
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "build-plugin"
|
6
build-plugin/src/main/kotlin/ProjectExtension.kt
Normal file
6
build-plugin/src/main/kotlin/ProjectExtension.kt
Normal file
|
@ -0,0 +1,6 @@
|
|||
import org.gradle.accessors.dm.LibrariesForLibs
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.kotlin.dsl.getByName
|
||||
|
||||
val Project.libs: LibrariesForLibs
|
||||
get() = extensions.getByName<LibrariesForLibs>("libs")
|
|
@ -15,6 +15,8 @@ dependencyResolutionManagement {
|
|||
}
|
||||
}
|
||||
|
||||
includeBuild("build-plugin")
|
||||
|
||||
include(":app:k9mail")
|
||||
include(":app:ui:base")
|
||||
include(":app:ui:setup")
|
||||
|
|
Loading…
Reference in a new issue