Skip to content

Commit ae3f9a8

Browse files
committed
#2 Raise minimum version to Java 17
Bump version to 2.0.0-SNAPSHOT due to incompatible change
1 parent 5ea06c5 commit ae3f9a8

File tree

5 files changed

+55
-23
lines changed

5 files changed

+55
-23
lines changed

.github/workflows/gradle.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ jobs:
2121
runs-on: ubuntu-latest
2222
steps:
2323
- uses: actions/checkout@v3
24-
- name: Set up JDK 11
24+
- name: Set up JDK 17
2525
uses: actions/setup-java@v3
2626
with:
27-
java-version: '11'
27+
java-version: '17'
2828
distribution: 'temurin'
2929
cache: gradle
3030
- name: Validate Gradle wrapper
31-
uses: gradle/wrapper-validation-action@55e685c48d84285a5b0418cd094606e199cca3b6
31+
uses: gradle/wrapper-validation-action@8d49e559aae34d3e0eb16cde532684bc9702762b
3232
- name: Build with Gradle
3333
run: ./gradlew assemble
3434
- name: Cleanup Gradle Cache

.github/workflows/publish-docs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- uses: actions/checkout@v3
19-
- name: Set up JDK 11
19+
- name: Set up JDK 17
2020
uses: actions/setup-java@v3
2121
with:
22-
java-version: '11'
22+
java-version: '17'
2323
distribution: 'temurin'
2424
cache: gradle
2525
- name: Validate Gradle wrapper
26-
uses: gradle/wrapper-validation-action@55e685c48d84285a5b0418cd094606e199cca3b6
26+
uses: gradle/wrapper-validation-action@8d49e559aae34d3e0eb16cde532684bc9702762b
2727
- name: Build with Gradle
2828
run: ./gradlew javadoc
2929
- name: Cleanup Gradle Cache
@@ -51,6 +51,6 @@ jobs:
5151
name: doc-artifacts
5252
path: docs
5353
- name: Deploy to GitHub pages
54-
uses: JamesIves/github-pages-deploy-action@v4.4.1
54+
uses: JamesIves/github-pages-deploy-action@v4.4.2
5555
with:
5656
folder: docs

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2017 - 2019 Firebird development team and individual contributors
1+
Copyright (c) 2017 - 2023 Firebird development team and individual contributors
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

build.gradle

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import java.time.Year
2+
13
/*
24
Gradle build script for decimal-java.
35
@@ -14,7 +16,7 @@ plugins {
1416
}
1517

1618
group 'org.firebirdsql'
17-
version '1.0.3-SNAPSHOT'
19+
version '2.0.0-SNAPSHOT'
1820

1921
ext.'signing.password' = credentials.forKey('signing.password')
2022
ext.ossrhPassword = credentials.forKey('ossrhPassword')
@@ -23,20 +25,16 @@ ext.isReleaseVersion = provider {
2325
!version.endsWith("SNAPSHOT")
2426
}
2527

26-
sourceCompatibility = JavaVersion.VERSION_1_7
27-
targetCompatibility = JavaVersion.VERSION_1_7
28-
29-
repositories {
30-
mavenCentral()
31-
}
28+
sourceCompatibility = JavaVersion.VERSION_17
29+
targetCompatibility = JavaVersion.VERSION_17
3230

3331
java {
3432
withJavadocJar()
3533
withSourcesJar()
3634
}
3735

3836
dependencies {
39-
testImplementation 'junit:junit:4.13.1'
37+
testImplementation project.testLibs.junit
4038
}
4139

4240
sourceSets {
@@ -53,7 +51,29 @@ sourceSets {
5351
}
5452
}
5553

56-
jar {
54+
tasks.withType(JavaCompile).configureEach {
55+
options.encoding = 'UTF-8'
56+
}
57+
58+
tasks.withType(Test).configureEach {
59+
systemProperty 'file.encoding', 'UTF-8'
60+
}
61+
62+
tasks.withType(Jar).configureEach {
63+
// General manifest info
64+
manifest {
65+
def buildYear = Year.now().toString()
66+
attributes(
67+
'Created-By': "${System.getProperty('java.vm.version')} (${System.getProperty('java.vm.vendor')})",
68+
'Bundle-License': 'MIT',
69+
'SPDX-License-Identifier': 'MIT',
70+
'SPDX-FileCopyrightText': "2017-$buildYear Firebird development team and individual contributors"
71+
)
72+
}
73+
}
74+
75+
tasks.named("jar", Jar) {
76+
// Info specific to main jar
5777
manifest {
5878
attributes(
5979
'Implementation-Title': project.name,
@@ -63,15 +83,13 @@ jar {
6383
}
6484
}
6585

66-
javadoc {
86+
tasks.named('javadoc', Javadoc).configure {
6787
options.author()
6888
options.windowTitle = "decimal-java API"
6989
options.docTitle = 'decimal-java'
70-
options.bottom = "Copyright © 2017-${new Date().format("yyyy")} Jaybird (Firebird JDBC) team. All rights reserved."
71-
if(JavaVersion.current().isJava9Compatible()) {
72-
options.addBooleanOption('html5', true)
73-
options.addBooleanOption('Xdoclint:none', true)
74-
}
90+
options.bottom = "Copyright © 2017-${new Date().format("yyyy")} Firebird development team and individual contributors. All rights reserved."
91+
options.addBooleanOption('html5', true)
92+
options.addBooleanOption('Xdoclint:none', true)
7593
}
7694

7795
publishing {

settings.gradle

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,16 @@
11
rootProject.name = 'decimal-java'
22

3+
dependencyResolutionManagement {
4+
repositories {
5+
mavenCentral()
6+
}
7+
8+
versionCatalogs {
9+
testLibs {
10+
version('junit', '4.13.1')
11+
12+
library('junit', 'junit', 'junit').versionRef('junit')
13+
}
14+
}
15+
}
16+

0 commit comments

Comments
 (0)