Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ jobs:
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run tests fluency-core
run: ./gradlew -p fluency-core check jacocoTestReport coveralls --stacktrace --info
run: ./gradlew -p fluency-core check --stacktrace --info
- name: Run tests fluency-fluentd
run: ./gradlew -p fluency-fluentd check jacocoTestReport coveralls --stacktrace --info
run: ./gradlew -p fluency-fluentd check --stacktrace --info
- name: Run tests fluency-treasuredata
run: ./gradlew -p fluency-treasuredata check jacocoTestReport coveralls --stacktrace --info
run: ./gradlew -p fluency-treasuredata check --stacktrace --info
- name: Run tests fluency-aws-s3
run: ./gradlew -p fluency-aws-s3 check jacocoTestReport coveralls --stacktrace --info
run: ./gradlew -p fluency-aws-s3 check --stacktrace --info

build_ext:
runs-on: ubuntu-latest
Expand All @@ -49,7 +49,7 @@ jobs:
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run tests fluency-fluentd-ext
run: ./gradlew -p fluency-fluentd-ext check jacocoTestReport coveralls --stacktrace --info
run: ./gradlew -p fluency-fluentd-ext check --stacktrace --info

# Fluency uses java.nio.ByteBuffer which can cause inconsistent method signature issue between JDK 8 and 9.
# We've created Fluency jars using JDK 8 for that and we need to confirm an application built with JDK 9 or later
Expand Down
98 changes: 29 additions & 69 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,27 @@ buildscript {

plugins {
`java-library`
idea
jacoco
signing
`maven-publish`
id("com.github.kt3k.coveralls") version "2.12.2"
id("com.gradleup.shadow") version "8.3.5"
id("com.diffplug.spotless") version "6.13.0"
id("org.jreleaser") version "1.22.0"
id("com.diffplug.spotless") version "6.13.0"
}

group = "org.komamitsu"
apply(from = "version.gradle")

subprojects {
group = "org.komamitsu"
apply(from = "../version.gradle")
apply(plugin = "java-library")
apply(plugin = "idea")
apply(plugin = "com.gradleup.shadow")
apply(plugin = "signing")
apply(plugin = "maven-publish")
apply(plugin = "org.jreleaser")
apply(plugin = "jacoco")
apply(plugin = "com.github.kt3k.coveralls")
apply(plugin = "com.diffplug.spotless")

group = rootProject.group
version = rootProject.version

repositories {
mavenCentral()
mavenLocal()
Expand Down Expand Up @@ -118,74 +116,36 @@ subprojects {
}
}

jreleaser {
gitRootSearch = true

project {
inceptionYear = "2025"
}

signing {
active = Active.ALWAYS
armored = true
}

deploy {
maven {
mavenCentral.create("sonatype") {
active = Active.ALWAYS
url = "https://central.sonatype.com/api/v1/publisher"
applyMavenCentralRules = true
stagingRepositories.set(listOf("${layout.buildDirectory.get().asFile}/staging-deploy"))
}
}
spotless {
java {
target("src/*/java/**/*.java")
importOrder()
removeUnusedImports()
googleJavaFormat("1.7")
}
}
}

val publishedProjects = project.subprojects

val jacocoRootReport by tasks.creating(JacocoReport::class) {
description = "Generates an aggregate report from all subprojects"
group = "Coverage reports"
val jacocoReportTasks = publishedProjects
.map { it.tasks["jacocoTestReport"] as JacocoReport }
.toList()
dependsOn(jacocoReportTasks)

executionData.setFrom(Callable { jacocoReportTasks.map { it.executionData } })

publishedProjects.forEach { testedProject ->
val mainSourceSet = testedProject.sourceSets["main"]
additionalSourceDirs(mainSourceSet.allSource.sourceDirectories)
additionalClassDirs(mainSourceSet.output)
}

reports {
xml.required.set(true)
html.required.set(true)
}
}
jreleaser {
gitRootSearch = true

coveralls {
sourceDirs = publishedProjects.map { proj ->
proj.sourceSets["main"].allSource.sourceDirectories.map {
it.toString()
}
}.flatten()
jacocoReportPath = "${buildDir}/reports/jacoco/jacocoRootReport/jacocoRootReport.xml"
project {
inceptionYear = "2025"
}

tasks.coveralls {
dependsOn(jacocoRootReport)
signing {
active = Active.ALWAYS
armored = true
}

spotless {
java {
target("src/*/java/**/*.java")
importOrder()
removeUnusedImports()
googleJavaFormat("1.7")
deploy {
maven {
mavenCentral.create("sonatype") {
active = Active.ALWAYS
url = "https://central.sonatype.com/api/v1/publisher"
applyMavenCentralRules = true
stagingRepositories.set(listOf("${layout.buildDirectory.get().asFile}/staging-deploy"))
}
}
}
}

Loading