Skip to content

Commit

Permalink
Merge branch 'main' into static-blocks-caching
Browse files Browse the repository at this point in the history
  • Loading branch information
tillschallau authored Jul 25, 2024
2 parents 521db9b + 5f09047 commit cc0c0d5
Show file tree
Hide file tree
Showing 21 changed files with 204 additions and 838 deletions.
9 changes: 1 addition & 8 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,14 @@ repositories {

dependencies {
implementation(libs.bundles.gradle.kotlin.full)
implementation(libs.bundles.ktor.netty)

implementation(libs.commons.compress)
implementation(libs.dockerClient)

implementation(libs.gradle.bmVersions)
implementation(libs.gradle.dependencyManagement)
implementation(libs.gradle.detekt)
implementation(libs.gradle.gitVersioning)
implementation(libs.gradle.kover)
implementation(libs.gradle.nexusPublish)
implementation(libs.gradle.spotless)
implementation(libs.gradle.spring.boot)
implementation(libs.gradle.taskTree)
implementation(libs.gradle.vaadin)
// implementation(libs.gradle.kover)

// black magic from https://github.com/gradle/gradle/issues/15383
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,121 @@
* limitations under the License.
*/

import org.gradle.accessors.dm.LibrariesForLibs
import org.gradle.api.publish.plugins.PublishingPlugin.PUBLISH_TASK_GROUP
import org.gradle.api.tasks.testing.logging.TestLogEvent.*
import org.gradle.kotlin.dsl.`java-library`
import tools.aqua.*
import tools.aqua.GlobalMavenMetadataExtension
import tools.aqua.MavenMetadataExtension
import tools.aqua.developer
import tools.aqua.github
import tools.aqua.license

plugins {
id("tools.aqua.stars.kotlin-conventions")
id("tools.aqua.stars.publish-conventions")
id("com.dorongold.task-tree")
id("com.github.ben-manes.versions")
id("com.diffplug.spotless")
id("io.gitlab.arturbosch.detekt")
id("org.jetbrains.dokka")

`java-library`
`maven-publish`
signing

kotlin("jvm")
}

group = rootProject.group

version = rootProject.version

repositories { mavenCentral() }

tasks.dependencyUpdates {
gradleReleaseChannel = "stable"
rejectVersionIf(destabilizesVersion)
}

spotless {
kotlinGradle { defaultFormat(rootProject) }
kotlin { defaultFormat(rootProject) }
}

detekt {
basePath = rootProject.projectDir.absolutePath
config.setFrom(files(rootProject.file("contrib/detekt-rules.yml")))
}

val kdocJar: TaskProvider<Jar> by
tasks.registering(Jar::class) {
archiveClassifier.set("kdoc")
from(tasks.dokkaHtml.flatMap { it.outputDirectory })
}

val kdoc: Configuration by
configurations.creating {
isCanBeConsumed = true
isCanBeResolved = false
}

artifacts { add(kdoc.name, kdocJar) }

val javadocJar: TaskProvider<Jar> by
tasks.registering(Jar::class) {
archiveClassifier.set("javadoc")
from(tasks.dokkaJavadoc.flatMap { it.outputDirectory })
}

java {
withSourcesJar()
withJavadocJar()
}

// black magic from https://github.com/gradle/gradle/issues/15383
val libs = the<LibrariesForLibs>()

dependencies {
dokkaGfmPlugin(libs.dokka.javadoc)

testImplementation(platform(libs.junit.bom))
testImplementation(libs.bundles.test)
}

tasks.test {
useJUnitPlatform()
testLogging { events(FAILED, PASSED, SKIPPED) }
}

kotlin { jvmToolchain(17) }

val mavenMetadata = extensions.create<MavenMetadataExtension>("mavenMetadata")

publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])

pom {
name.set(mavenMetadata.name)
description.set(mavenMetadata.description)

val globalMetadata = rootProject.extensions.getByType<GlobalMavenMetadataExtension>()

developers { globalMetadata.developers.get().forEach { developer(it.name, it.email) } }

globalMetadata.githubProject.get().let {
github(it.organization, it.project, it.mainBranch)
}

licenses { globalMetadata.licenses.get().forEach { license(it.name, it.url) } }
}
}
}
}

signing {
setRequired { gradle.taskGraph.allTasks.any { it.group == PUBLISH_TASK_GROUP } }
useGpgCmd()
sign(publishing.publications["maven"])
}
Loading

0 comments on commit cc0c0d5

Please sign in to comment.