Skip to content

Commit

Permalink
chore: Setup gradle releases (#9)
Browse files Browse the repository at this point in the history
This sets up gradle plugin publishing without automation.
  • Loading branch information
Nava2 authored Aug 16, 2024
1 parent ac0a22a commit 721a2e4
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ In the root `build.gradle.kts` file, apply the plugin:

```kotlin
plugins {
id("faire.build-targets") version "1.0.+"
id("com.faire.build-targets") version "1.0.+"
}
```

Expand Down
1 change: 1 addition & 0 deletions build-logic/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ java {
dependencies {
implementation(libs.pluginz.detekt)
implementation(libs.pluginz.kotlin)
implementation(libs.pluginz.gradle.plugin.publish)

testImplementation(gradleTestKit())

Expand Down
2 changes: 2 additions & 0 deletions build-logic/src/main/kotlin/faire.gradle-plugin.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ plugins {
id("faire.kotlin")

`java-gradle-plugin`

id("com.gradle.plugin-publish")
}

val libs = rootProject.extensions.getByType<VersionCatalogsExtension>().named("libs")
Expand Down
10 changes: 7 additions & 3 deletions build-targets-gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ plugins {
id("faire.gradle-plugin")
}

group = "com.faire"
version = "1.0.0"
group = "com.faire.gradle"
version = "0.0.0"

dependencies {
api(kotlin("stdlib"))
Expand All @@ -19,11 +19,15 @@ dependencies {
}

gradlePlugin {
website = "https://github.com/Faire/build-targets-gradle-plugin"
vcsUrl = "https://github.com/Faire/build-targets-gradle-plugin.git"

plugins {
create("faire.build-targets") {
id = "faire.build-targets"
id = "com.faire.build-targets"
displayName = "Show the impacted targets for a project"
implementationClass = "com.faire.gradle.release.ShowBuildTargetsForChangePlugin"
tags = listOf("ci", "continuous-integration", "merge-queue", "release")
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
alias(libs.plugins.kotlin) apply false
id("faire.build-targets")
id("com.faire.build-targets")
}

allprojects {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
plugins {
id("faire.build-targets")
id("com.faire.build-targets")
kotlin("jvm")
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id("faire.build-targets")
id("com.faire.build-targets")
kotlin("jvm")
application
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id("faire.build-targets")
id("com.faire.build-targets")
kotlin("jvm")
application
}
Expand Down
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ navatwo-gradle-better-testing-asserts = { module = "net.navatwo.gradle:gradle-pl

pluginz-detekt = { module = "io.gitlab.arturbosch.detekt:detekt-gradle-plugin", version.ref = "detekt" }

pluginz-gradle-plugin-publish = { module = "com.gradle.publish:plugin-publish-plugin", version = "1.2.1" }

pluginz-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }

[plugins]
Expand Down

0 comments on commit 721a2e4

Please sign in to comment.