Skip to content

Commit

Permalink
#2 Raise minimum version to Java 17
Browse files Browse the repository at this point in the history
Bump version to 2.0.0-SNAPSHOT due to incompatible change
  • Loading branch information
mrotteveel committed Jun 30, 2023
1 parent 5ea06c5 commit ae3f9a8
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 23 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@55e685c48d84285a5b0418cd094606e199cca3b6
uses: gradle/wrapper-validation-action@8d49e559aae34d3e0eb16cde532684bc9702762b
- name: Build with Gradle
run: ./gradlew assemble
- name: Cleanup Gradle Cache
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@55e685c48d84285a5b0418cd094606e199cca3b6
uses: gradle/wrapper-validation-action@8d49e559aae34d3e0eb16cde532684bc9702762b
- name: Build with Gradle
run: ./gradlew javadoc
- name: Cleanup Gradle Cache
Expand Down Expand Up @@ -51,6 +51,6 @@ jobs:
name: doc-artifacts
path: docs
- name: Deploy to GitHub pages
uses: JamesIves/[email protected].1
uses: JamesIves/[email protected].2
with:
folder: docs
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2017 - 2019 Firebird development team and individual contributors
Copyright (c) 2017 - 2023 Firebird development team and individual contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
48 changes: 33 additions & 15 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import java.time.Year

/*
Gradle build script for decimal-java.
Expand All @@ -14,7 +16,7 @@ plugins {
}

group 'org.firebirdsql'
version '1.0.3-SNAPSHOT'
version '2.0.0-SNAPSHOT'

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

sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7

repositories {
mavenCentral()
}
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

java {
withJavadocJar()
withSourcesJar()
}

dependencies {
testImplementation 'junit:junit:4.13.1'
testImplementation project.testLibs.junit
}

sourceSets {
Expand All @@ -53,7 +51,29 @@ sourceSets {
}
}

jar {
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}

tasks.withType(Test).configureEach {
systemProperty 'file.encoding', 'UTF-8'
}

tasks.withType(Jar).configureEach {
// General manifest info
manifest {
def buildYear = Year.now().toString()
attributes(
'Created-By': "${System.getProperty('java.vm.version')} (${System.getProperty('java.vm.vendor')})",
'Bundle-License': 'MIT',
'SPDX-License-Identifier': 'MIT',
'SPDX-FileCopyrightText': "2017-$buildYear Firebird development team and individual contributors"
)
}
}

tasks.named("jar", Jar) {
// Info specific to main jar
manifest {
attributes(
'Implementation-Title': project.name,
Expand All @@ -63,15 +83,13 @@ jar {
}
}

javadoc {
tasks.named('javadoc', Javadoc).configure {
options.author()
options.windowTitle = "decimal-java API"
options.docTitle = 'decimal-java'
options.bottom = "Copyright © 2017-${new Date().format("yyyy")} Jaybird (Firebird JDBC) team. All rights reserved."
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
options.addBooleanOption('Xdoclint:none', true)
}
options.bottom = "Copyright © 2017-${new Date().format("yyyy")} Firebird development team and individual contributors. All rights reserved."
options.addBooleanOption('html5', true)
options.addBooleanOption('Xdoclint:none', true)
}

publishing {
Expand Down
14 changes: 14 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
rootProject.name = 'decimal-java'

dependencyResolutionManagement {
repositories {
mavenCentral()
}

versionCatalogs {
testLibs {
version('junit', '4.13.1')

library('junit', 'junit', 'junit').versionRef('junit')
}
}
}

0 comments on commit ae3f9a8

Please sign in to comment.