Skip to content

Commit

Permalink
Create release plugin
Browse files Browse the repository at this point in the history
Fixes #28
  • Loading branch information
philipp94831 committed Mar 4, 2024
1 parent 4decda0 commit 255ab68
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 5 additions & 3 deletions release/src/main/kotlin/com/bakdata/gradle/ReleasePlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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<Project> {

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.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 255ab68

Please sign in to comment.