Skip to content
Closed
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
31 changes: 31 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: build

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
java:
strategy:
matrix:
java: [25]
os: ['ubuntu-latest']
runs-on: ${{ matrix.os }}
name: Build on ${{ matrix.os }} on Java ${{ matrix.java }}
steps:
- uses: actions/checkout@v6
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v5
with:
distribution: corretto
java-version: ${{ matrix.java }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
- name: Build with Gradle
run: |
cd java && ./gradlew --no-daemon -s :build
# TODO: add golang build
30 changes: 15 additions & 15 deletions java/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
plugins {
// Apply the java-library plugin for API and implementation separation.
`java-library`
id("com.google.protobuf") version "0.9.4"
id("io.freefair.lombok") version "8.6"
id("com.github.johnrengelman.shadow") version "7.1.2"
id("com.google.protobuf") version "0.10.0"
id("io.freefair.lombok") version "9.5.0"
id("com.gradleup.shadow") version "9.4.2"
jacoco
id("com.github.spotbugs") version "6.0.7"
id("com.github.spotbugs") version "6.5.6"
checkstyle
id("org.cyclonedx.bom") version "1.10.0"
id("org.cyclonedx.bom") version "3.2.4"
}

repositories {
Expand Down Expand Up @@ -51,7 +51,7 @@ dependencies {
implementation("org.apache.commons:commons-lang3:3.0")
implementation("com.jayway.jsonpath:json-path:2.9.0")
implementation("io.github.resilience4j:resilience4j-retry:2.2.0")
implementation(enforcedPlatform("com.fasterxml.jackson:jackson-bom:2.17.0"))
implementation(platform("com.fasterxml.jackson:jackson-bom:2.17.0"))
implementation("com.fasterxml.jackson.core:jackson-core")
implementation("com.fasterxml.jackson.core:jackson-annotations")
implementation("com.fasterxml.jackson.core:jackson-databind")
Expand All @@ -78,7 +78,7 @@ protobuf {
}

jacoco {
toolVersion = "0.8.9" // Use the latest version available
toolVersion = "0.8.15" // Use the latest version available
}

tasks.jacocoTestReport {
Expand Down Expand Up @@ -122,7 +122,7 @@ tasks.jacocoTestCoverageVerification {
}

spotbugs {
toolVersion.set("4.8.3")
toolVersion.set("4.10.2")
ignoreFailures.set(false)
showProgress.set(true)
effort.set(com.github.spotbugs.snom.Effort.MAX)
Expand Down Expand Up @@ -201,16 +201,14 @@ tasks.javadoc {
}
}

java {
withJavadocJar()
withSourcesJar()
}

tasks {
jar {
archiveBaseName.set("DemandDrivenTrafficEvaluator")
archiveClassifier.set("core")
archiveVersion.set("2.0.0") // Set your library version
}
named<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar>("shadowJar") {
archiveBaseName.set("DemandDrivenTrafficEvaluator")
archiveClassifier.set("fat")
archiveVersion.set("2.0.0") // Set your library version
destinationDirectory.set(layout.buildDirectory.dir("libs"))
configurations = listOf(project.configurations.runtimeClasspath.get())

Expand Down Expand Up @@ -243,3 +241,5 @@ tasks {
finalizedBy(jacocoTestReport)
}
}

project.group = "com.amazon.demanddriventrafficevaluator"
5 changes: 3 additions & 2 deletions java/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# This file was generated by the Gradle 'init' task.
# https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties

org.gradle.parallel=true
org.gradle.caching=true
version=2.0.0

org.gradle.parallel=true
org.gradle.caching=true
2 changes: 1 addition & 1 deletion java/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
3 changes: 1 addition & 2 deletions java/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@ plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
}

rootProject.name = "DemandDrivenTrafficEvaluator"
include("lib")
rootProject.name = "demand-driven-traffic-evaluator"