Skip to content

Commit

Permalink
Include sources in the Gradle plugin (Maven) publications and improve…
Browse files Browse the repository at this point in the history
… `CommonDependencies.Vertx`
  • Loading branch information
ShreckYe committed May 27, 2022
1 parent 046b93f commit ecedde8
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@ group = "com.huanshankeji"
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

withSourcesJar()
withJavadocJar()
}
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/plugin-conventions.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies {
implementation(kotlin("gradle-plugin", "1.6.10"))
}

version = "0.1.3-kotlin-1.6.10-SNAPSHOT"
version = "0.1.4-kotlin-1.6.10-SNAPSHOT"

pluginBundle {
website = "https://github.com/huanshankeji/gradle-plugin"
Expand Down
4 changes: 3 additions & 1 deletion common-gradle-dependencies/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ plugins {
id("build-dependency-library-conventions")
}

version = "0.1.0-20220522-kotlin-1.6.10-dev"
// `SNAPSHOT` means it's under development until that version,
// and `dev` means it has been under development since that version.
version = "0.1.1-SNAPSHOT-20220522-dev-kotlin-1.6.10"
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.huanshankeji

import org.gradle.api.artifacts.dsl.DependencyHandler

// some but not all default dependencies
object CommonDependencies {
object KotlinCommon {
Expand Down Expand Up @@ -83,11 +85,18 @@ object CommonDependencies {

object Vertx {
val defaultVersion = DefaultVersions.vertx
fun stackDepchain(version: String = defaultVersion) =
"io.vertx:vertx-stack-depchain:$version"

fun module(module: String) =
private fun stackDepchain(version: String = defaultVersion) =
moduleWithVersion("stack-depchain", version)

fun DependencyHandler.platformStackDepchain(version: String = defaultVersion) =
platform(stackDepchain(version))

fun moduleWithoutVersion(module: String) =
"io.vertx:vertx-$module"

fun moduleWithVersion(module: String, version: String = defaultVersion) =
"${moduleWithoutVersion(module)}:$version"
}

object Arrow {
Expand Down

0 comments on commit ecedde8

Please sign in to comment.