Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update plugin org.springframework.boot to v3 #72

Merged
merged 2 commits into from
Dec 18, 2024
Merged
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/gradle.yml
Original file line number Diff line number Diff line change
@@ -6,15 +6,15 @@ name: Test
on: push

jobs:
build:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '11'
- name: Build with Gradle
run: ./gradlew build
java-version: '21'
- name: Run unit tests
run: ./gradlew test
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -65,6 +65,14 @@ aws:
# metrics that start with 'metric-prefix'
```

## Dependencies

This project depends on the following libraries:
* soring-bean
* spring-context
* spring-web
* fasterxml

## Release

Change version in `build.gradle.kts`, `README.md` and issue:
68 changes: 5 additions & 63 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
import org.gradle.api.tasks.wrapper.Wrapper.DistributionType.ALL
import org.springframework.boot.gradle.tasks.bundling.BootJar

plugins {
id("com.adarshr.test-logger") version "4.0.0"
id("io.spring.dependency-management") version "1.1.0"
id("java-library")
id("maven-publish")
id("com.github.ben-manes.versions") version "0.51.0"
id("com.jfrog.bintray") version "1.8.5"
id("org.springframework.boot") version "2.7.18"
id("com.adarshr.test-logger") version "4.0.0"
id("org.springframework.boot") version "3.4.0"
}

group = "de.inoxio"
version = "1.2.0"
version = "2.0.0"
description = "A java-spring library to push metrics to cloudwatch"

apply {
plugin("io.spring.dependency-management")
}

repositories {
mavenCentral()
}
@@ -36,8 +29,7 @@ dependencies {
}

java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_21
}

val sourcesJar by tasks.registering(Jar::class) {
@@ -89,46 +81,6 @@ publishing {
}
}

bintray {
user = properties["bintray.user"] as String?
?: System.getenv("BINTRAY_USER")
key = properties["bintray.api-key"] as String?
?: System.getenv("BINTRAY_API_KEY")

setPublications("publication")

publish = true
override = false

pkg.apply {
repo = "maven"
name = project.name
userOrg = "inoxio"
desc = project.description
websiteUrl = "https://github.com/inoxio/${project.name}"
issueTrackerUrl = "https://github.com/inoxio/${project.name}/issues"
vcsUrl = "https://github.com/inoxio/${project.name}.git"
setLicenses("Apache-2.0")
githubRepo = "inoxio/${project.name}"

version.apply {
name = project.version as String
vcsTag = project.version as String
gpg.apply {
sign = true
}
mavenCentralSync.apply {
sync = true
user = properties["oss.user"] as String?
?: System.getenv("OSS_USER")
password = properties["oss.password"] as String?
?: System.getenv("OSS_PASSWORD")
close = "1"
}
}
}
}

tasks {
withType<JavaCompile> {
options.apply {
@@ -147,16 +99,6 @@ tasks {
withType<Test> {
useJUnitPlatform()
}
withType<DependencyUpdatesTask> {
rejectVersionIf {
listOf("alpha", "beta", "rc", "cr", "m", "preview", "b", "ea", "pr")
.any { qualifier -> "(?i).*[.-]$qualifier[.\\d-+]*".toRegex().matches(candidate.version) }
}
}
withType<Wrapper> {
distributionType = ALL
gradleVersion = "8.9"
}
withType<Javadoc> {
(options as StandardJavadocDocletOptions).addBooleanOption("html5", true)
}
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.gradle.warning.mode=all
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
import java.util.function.Predicate;
import java.util.stream.Collectors;

import javax.annotation.PostConstruct;
import jakarta.annotation.PostConstruct;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -106,8 +106,7 @@ void annotateServerStart() {

void handleGetDashboard(final String widgets, final Throwable throwable) {
// log a warning when dashboard was not found
if (throwable != null && throwable.getCause() instanceof ResourceNotFoundException) {
final var cause = (ResourceNotFoundException) throwable.getCause();
if (throwable != null && throwable.getCause() instanceof final ResourceNotFoundException cause) {
LOG.warn(cause.awsErrorDetails().errorMessage());
return;
}
Loading