-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prepare backfila for automatically publishing to maven
- Loading branch information
Tristan Ohlson
committed
Jun 6, 2023
1 parent
f967529
commit 9322396
Showing
38 changed files
with
152 additions
and
330 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
import com.diffplug.gradle.spotless.SpotlessExtension | ||
import com.vanniktech.maven.publish.MavenPublishBaseExtension | ||
import com.vanniktech.maven.publish.SonatypeHost | ||
import org.gradle.api.tasks.testing.logging.TestExceptionFormat | ||
import org.jetbrains.dokka.gradle.DokkaTask | ||
import org.jetbrains.kotlin.allopen.gradle.AllOpenExtension | ||
|
@@ -21,23 +23,22 @@ buildscript { | |
} | ||
} | ||
|
||
apply(plugin = "com.vanniktech.maven.publish.base") | ||
|
||
allprojects { | ||
group = project.property("GROUP") as String | ||
version = project.findProperty("VERSION_NAME") as? String ?: "0.0-SNAPSHOT" | ||
} | ||
|
||
subprojects { | ||
apply(plugin = "java") | ||
apply(plugin = "kotlin") | ||
apply(plugin = "com.diffplug.spotless") | ||
apply(plugin = "org.jetbrains.dokka") | ||
apply(plugin = "org.jetbrains.kotlin.plugin.allopen") | ||
|
||
val compileKotlin by tasks.getting(KotlinCompile::class) { | ||
kotlinOptions { | ||
jvmTarget = JavaVersion.VERSION_11.toString() | ||
} | ||
tasks.withType<KotlinCompile> { | ||
dependsOn("spotlessKotlinApply") | ||
} | ||
|
||
val compileTestKotlin by tasks.getting(KotlinCompile::class) { | ||
kotlinOptions { | ||
jvmTarget = JavaVersion.VERSION_11.toString() | ||
jvmTarget = "11" | ||
} | ||
} | ||
|
||
|
@@ -116,7 +117,35 @@ subprojects { | |
} | ||
} | ||
|
||
// Disable the Gradle wrapper if Gradle is managed by Hermit | ||
tasks.named<Wrapper>("wrapper") { | ||
enabled = false | ||
} | ||
|
||
allprojects { | ||
plugins.withId("com.vanniktech.maven.publish.base") { | ||
configure<MavenPublishBaseExtension> { | ||
publishToMavenCentral(SonatypeHost.DEFAULT, automaticRelease = true) | ||
signAllPublications() | ||
pom { | ||
description.set("Backfila is a service that manages backfill state, calling into other services to do batched work.") | ||
name.set(project.name) | ||
url.set("https://github.com/cashapp/backfila/") | ||
licenses { | ||
license { | ||
name.set("The Apache Software License, Version 2.0") | ||
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") | ||
distribution.set("repo") | ||
} | ||
} | ||
scm { | ||
url.set("https://github.com/cashapp/backfila/") | ||
connection.set("scm:git:git://github.com/cashapp/backfila.git") | ||
developerConnection.set("scm:git:ssh://[email protected]/cashapp/backfila.git") | ||
} | ||
developers { | ||
developer { | ||
id.set("square") | ||
name.set("Square, Inc.") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,11 @@ | ||
apply(plugin = "kotlin") | ||
plugins { | ||
kotlin("jvm") | ||
`java-library` | ||
id("com.vanniktech.maven.publish.base") | ||
} | ||
|
||
dependencies { | ||
implementation(Dependencies.kotlinStdLib) | ||
|
||
api(project(":client-dynamodb")) | ||
} | ||
|
||
val jar by tasks.getting(Jar::class) { | ||
archiveBaseName.set("backfila-misk-client-dynamodb") | ||
} | ||
|
||
if (rootProject.file("hooks.gradle").exists()) { | ||
apply(from = rootProject.file("hooks.gradle")) | ||
} | ||
|
||
apply(from = "$rootDir/gradle-mvn-publish.gradle") |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,11 @@ | ||
apply(plugin = "kotlin") | ||
plugins { | ||
kotlin("jvm") | ||
`java-library` | ||
id("com.vanniktech.maven.publish.base") | ||
} | ||
|
||
dependencies { | ||
implementation(Dependencies.kotlinStdLib) | ||
|
||
api(project(":client-jooq")) | ||
} | ||
|
||
val jar by tasks.getting(Jar::class) { | ||
archiveBaseName.set("backfila-client-misk-jooq") | ||
} | ||
if (rootProject.file("hooks.gradle").exists()) { | ||
apply(from = rootProject.file("hooks.gradle")) | ||
} | ||
|
||
apply(from = "$rootDir/gradle-mvn-publish.gradle") |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.