Skip to content

Commit

Permalink
chore(gradle): create test scopes plugin convention for test scopes m…
Browse files Browse the repository at this point in the history
…odules.
  • Loading branch information
GerardPaligot committed Dec 10, 2024
1 parent 517930f commit 78200c5
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 12 deletions.
4 changes: 4 additions & 0 deletions build-logic/plugins/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ gradlePlugin {
id = "confily.semantics"
implementationClass = "conventions.SemanticsLibraryPlugin"
}
register("testScopesLibrary") {
id = "confily.test.scopes"
implementationClass = "conventions.TestScopesLibraryPlugin"
}
register("androidWearLibrary") {
id = "confily.android.wear.library"
implementationClass = "AndroidWearLibraryPlugin"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package conventions

import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.kotlin.dsl.configure
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension

class TestScopesLibraryPlugin: Plugin<Project> {
@OptIn(ExperimentalWasmDsl::class)
override fun apply(target: Project) {
with(target) {
with(pluginManager) {
apply("confily.multiplatform.library")
apply("confily.quality")
}
extensions.configure<KotlinMultiplatformExtension> {
androidTarget()
wasmJs {
useCommonJs()
browser()
}
}
}
}
}
7 changes: 1 addition & 6 deletions features/schedules/schedules-test-scopes/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
plugins {
id("confily.multiplatform.library")
id("confily.quality")
id("confily.test.scopes")
}

android {
namespace = "com.paligot.confily.schedules.test.scopes"
}

kotlin {
androidTarget()
}
7 changes: 1 addition & 6 deletions features/speakers/speakers-test-scopes/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
plugins {
id("confily.multiplatform.library")
id("confily.quality")
id("confily.test.scopes")
}

android {
namespace = "com.paligot.confily.speakers.test.scopes"
}

kotlin {
androidTarget()
}

0 comments on commit 78200c5

Please sign in to comment.