diff --git a/release/src/main/kotlin/com/bakdata/gradle/ReleasePlugin.kt b/release/src/main/kotlin/com/bakdata/gradle/ReleasePlugin.kt index d77f547..65b9523 100644 --- a/release/src/main/kotlin/com/bakdata/gradle/ReleasePlugin.kt +++ b/release/src/main/kotlin/com/bakdata/gradle/ReleasePlugin.kt @@ -31,11 +31,13 @@ import org.gradle.api.Project import org.gradle.kotlin.dsl.apply import org.gradle.kotlin.dsl.configure -const val DISABLE_PUSH_TO_REMOTE = "release.disablePushToRemote" -const val REQUIRE_BRANCH = "release.requireBranch" - class ReleasePlugin : Plugin { + companion object { + const val DISABLE_PUSH_TO_REMOTE = "release.disablePushToRemote" + const val REQUIRE_BRANCH = "release.requireBranch" + } + override fun apply(rootProject: Project) { if (rootProject.parent != null) { throw GradleException("Apply this plugin only to the top-level project.") diff --git a/release/src/test/kotlin/com/bakdata/gradle/ReleasePluginTest.kt b/release/src/test/kotlin/com/bakdata/gradle/ReleasePluginTest.kt index 37203f7..90c8af4 100644 --- a/release/src/test/kotlin/com/bakdata/gradle/ReleasePluginTest.kt +++ b/release/src/test/kotlin/com/bakdata/gradle/ReleasePluginTest.kt @@ -24,6 +24,8 @@ package com.bakdata.gradle +import com.bakdata.gradle.ReleasePlugin.Companion.DISABLE_PUSH_TO_REMOTE +import com.bakdata.gradle.ReleasePlugin.Companion.REQUIRE_BRANCH import net.researchgate.release.ReleaseExtension import net.researchgate.release.ReleasePlugin import org.assertj.core.api.Assertions.assertThat