Skip to content

Commit

Permalink
Release 1.3.1 (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
rainbowdashlabs authored Jul 20, 2023
2 parents 2ab4c86 + d3f7f3b commit 34cc648
Show file tree
Hide file tree
Showing 101 changed files with 559 additions and 863 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/javadocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
echo "Creating .nojekyll to have Github pages deploy html as is:"
touch .nojekyll
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4.4.1
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages # The branch the action should deploy to.
folder: build/docs/javadoc # The folder the action should deploy.
2 changes: 1 addition & 1 deletion .github/workflows/publish_to_nexus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3.5.0
- uses: actions/checkout@v3
- name: Set up JDK 15
uses: actions/setup-java@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: Gradle build

steps:
- uses: actions/checkout@v3.5.0
- uses: actions/checkout@v3
- name: Set up JDK 15
uses: actions/setup-java@v3
with:
Expand Down
7 changes: 5 additions & 2 deletions HEADER.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
SPDX-License-Identifier: AGPL-3.0-only
/*
* SPDX-License-Identifier: LGPL-3.0-or-later
*
* Copyright (C) RainbowDashLabs and Contributor
*/

Copyright (C) 2022 RainbowDashLabs and Contributor
816 changes: 160 additions & 656 deletions LICENSE.md

Large diffs are not rendered by default.

35 changes: 22 additions & 13 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import com.diffplug.gradle.spotless.SpotlessPlugin

plugins {
java
`maven-publish`
`java-library`
id("de.chojo.publishdata") version "1.2.4"
id("org.cadixdev.licenser") version "0.6.1"
alias(libs.plugins.spotless)
}

group = "de.chojo.sadu"
version = "1.3.0"
version = "1.3.1"

dependencies {
api(project(":sadu-sqlite"))
Expand All @@ -22,7 +24,7 @@ subprojects {
apply {
// We want to apply several plugins to subprojects
plugin<JavaPlugin>()
plugin<org.cadixdev.gradle.licenser.Licenser>()
plugin<SpotlessPlugin>()
plugin<de.chojo.PublishData>()
plugin<JavaLibraryPlugin>()
plugin<MavenPublishPlugin>()
Expand All @@ -45,14 +47,16 @@ allprojects {
}

dependencies {
testImplementation("org.junit.jupiter", "junit-jupiter-api", "5.9.2")
testRuntimeOnly("org.junit.jupiter", "junit-jupiter-engine", "5.9.2")
testImplementation("org.junit.jupiter", "junit-jupiter-api", "5.9.3")
testRuntimeOnly("org.junit.jupiter", "junit-jupiter-engine", "5.9.3")
testImplementation("org.mockito", "mockito-core", "3.+")
}

license {
header(rootProject.file("HEADER.txt"))
include("**/*.java")
spotless {
java {
licenseHeaderFile(rootProject.file("HEADER.txt"))
target("**/*.java")
}
}

publishData {
Expand All @@ -64,6 +68,7 @@ allprojects {
publishing {
publications.create<MavenPublication>("maven") {
publishData.configurePublication(this)

pom {
url.set("https://github.com/rainbowdashlabs/sadu")
developers {
Expand Down Expand Up @@ -100,25 +105,29 @@ allprojects {
// We configure some general tasks for our modules
tasks {
test {
dependsOn(licenseCheck)
dependsOn(spotlessCheck)
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed")
}
}

compileJava {
dependsOn(spotlessApply)
}

javadoc {
applyJavaDocOptions(options)
}
}
}

fun applyJavaDocOptions(options: MinimalJavadocOptions){
fun applyJavaDocOptions(options: MinimalJavadocOptions) {
val javaDocOptions = options as StandardJavadocDocletOptions
javaDocOptions.links(
"https://javadoc.io/doc/com.google.code.findbugs/jsr305/latest/",
"https://javadoc.io/doc/org.jetbrains/annotations/latest/",
"https://docs.oracle.com/en/java/javase/${java.toolchain.languageVersion.get().asInt()}/docs/api/"
"https://javadoc.io/doc/com.google.code.findbugs/jsr305/latest/",
"https://javadoc.io/doc/org.jetbrains/annotations/latest/",
"https://docs.oracle.com/en/java/javase/${java.toolchain.languageVersion.get().asInt()}/docs/api/"
)
}

Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
12 changes: 8 additions & 4 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ done
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum

Expand Down Expand Up @@ -133,10 +130,13 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
Expand Down Expand Up @@ -197,6 +197,10 @@ if "$cygwin" || "$msys" ; then
done
fi


# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SPDX-License-Identifier: AGPL-3.0-only
* SPDX-License-Identifier: LGPL-3.0-or-later
*
* Copyright (C) 2022 RainbowDashLabs and Contributor
* Copyright (C) RainbowDashLabs and Contributor
*/

package de.chojo.sadu.base;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SPDX-License-Identifier: AGPL-3.0-only
* SPDX-License-Identifier: LGPL-3.0-or-later
*
* Copyright (C) 2022 RainbowDashLabs and Contributor
* Copyright (C) RainbowDashLabs and Contributor
*/

package de.chojo.sadu.conversion;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SPDX-License-Identifier: AGPL-3.0-only
* SPDX-License-Identifier: LGPL-3.0-or-later
*
* Copyright (C) 2022 RainbowDashLabs and Contributor
* Copyright (C) RainbowDashLabs and Contributor
*/

package de.chojo.sadu.conversion;
Expand Down
4 changes: 2 additions & 2 deletions sadu-core/src/main/java/de/chojo/sadu/databases/Database.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SPDX-License-Identifier: AGPL-3.0-only
* SPDX-License-Identifier: LGPL-3.0-or-later
*
* Copyright (C) 2022 RainbowDashLabs and Contributor
* Copyright (C) RainbowDashLabs and Contributor
*/

package de.chojo.sadu.databases;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SPDX-License-Identifier: AGPL-3.0-only
* SPDX-License-Identifier: LGPL-3.0-or-later
*
* Copyright (C) 2022 RainbowDashLabs and Contributor
* Copyright (C) RainbowDashLabs and Contributor
*/

package de.chojo.sadu.databases;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SPDX-License-Identifier: AGPL-3.0-only
* SPDX-License-Identifier: LGPL-3.0-or-later
*
* Copyright (C) 2022 RainbowDashLabs and Contributor
* Copyright (C) RainbowDashLabs and Contributor
*/

package de.chojo.sadu.databases.exceptions;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SPDX-License-Identifier: AGPL-3.0-only
* SPDX-License-Identifier: LGPL-3.0-or-later
*
* Copyright (C) 2022 RainbowDashLabs and Contributor
* Copyright (C) RainbowDashLabs and Contributor
*/

package de.chojo.sadu.databases.exceptions;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SPDX-License-Identifier: AGPL-3.0-only
* SPDX-License-Identifier: LGPL-3.0-or-later
*
* Copyright (C) 2022 RainbowDashLabs and Contributor
* Copyright (C) RainbowDashLabs and Contributor
*/

package de.chojo.sadu.exceptions;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SPDX-License-Identifier: AGPL-3.0-only
* SPDX-License-Identifier: LGPL-3.0-or-later
*
* Copyright (C) 2022 RainbowDashLabs and Contributor
* Copyright (C) RainbowDashLabs and Contributor
*/

package de.chojo.sadu.exceptions;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SPDX-License-Identifier: AGPL-3.0-only
* SPDX-License-Identifier: LGPL-3.0-or-later
*
* Copyright (C) 2022 RainbowDashLabs and Contributor
* Copyright (C) RainbowDashLabs and Contributor
*/

package de.chojo.sadu.exceptions;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SPDX-License-Identifier: AGPL-3.0-only
* SPDX-License-Identifier: LGPL-3.0-or-later
*
* Copyright (C) 2022 RainbowDashLabs and Contributor
* Copyright (C) RainbowDashLabs and Contributor
*/

package de.chojo.sadu.exceptions;
Expand Down
4 changes: 2 additions & 2 deletions sadu-core/src/main/java/de/chojo/sadu/jdbc/JdbProperty.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SPDX-License-Identifier: AGPL-3.0-only
* SPDX-License-Identifier: LGPL-3.0-or-later
*
* Copyright (C) 2022 RainbowDashLabs and Contributor
* Copyright (C) RainbowDashLabs and Contributor
*/

package de.chojo.sadu.jdbc;
Expand Down
4 changes: 2 additions & 2 deletions sadu-core/src/main/java/de/chojo/sadu/jdbc/JdbcConfig.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SPDX-License-Identifier: AGPL-3.0-only
* SPDX-License-Identifier: LGPL-3.0-or-later
*
* Copyright (C) 2022 RainbowDashLabs and Contributor
* Copyright (C) RainbowDashLabs and Contributor
*/

package de.chojo.sadu.jdbc;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SPDX-License-Identifier: AGPL-3.0-only
* SPDX-License-Identifier: LGPL-3.0-or-later
*
* Copyright (C) 2022 RainbowDashLabs and Contributor
* Copyright (C) RainbowDashLabs and Contributor
*/

package de.chojo.sadu.jdbc;
Expand Down
4 changes: 2 additions & 2 deletions sadu-core/src/main/java/de/chojo/sadu/types/SqlType.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SPDX-License-Identifier: AGPL-3.0-only
* SPDX-License-Identifier: LGPL-3.0-or-later
*
* Copyright (C) 2022 RainbowDashLabs and Contributor
* Copyright (C) RainbowDashLabs and Contributor
*/

package de.chojo.sadu.types;
Expand Down
25 changes: 22 additions & 3 deletions sadu-core/src/main/java/de/chojo/sadu/updater/SqlVersion.java
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
/*
* SPDX-License-Identifier: AGPL-3.0-only
* SPDX-License-Identifier: LGPL-3.0-or-later
*
* Copyright (C) 2022 RainbowDashLabs and Contributor
* Copyright (C) RainbowDashLabs and Contributor
*/

package de.chojo.sadu.updater;

import org.jetbrains.annotations.NotNull;

/**
* Class representing a version maintained by the SqlUpdaterBuilder
* <p>
* A version id defined by a major and a patch version.
*/
public class SqlVersion {
public class SqlVersion implements Comparable<SqlVersion> {
private final int major;
private final int patch;

Expand Down Expand Up @@ -66,4 +68,21 @@ public int hashCode() {
public String toString() {
return "%s.%s".formatted(major, patch);
}

public boolean isNewer(SqlVersion version) {
return compareTo(version) > 0;
}

public boolean isOlder(SqlVersion version) {
return compareTo(version) < 0;
}

@Override
public int compareTo(@NotNull SqlVersion o) {
int compare = Integer.compare(major, o.major);
if (compare != 0) {
return compare;
}
return Integer.compare(patch, o.patch);
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SPDX-License-Identifier: AGPL-3.0-only
* SPDX-License-Identifier: LGPL-3.0-or-later
*
* Copyright (C) 2022 RainbowDashLabs and Contributor
* Copyright (C) RainbowDashLabs and Contributor
*/

package de.chojo.sadu.updater;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SPDX-License-Identifier: AGPL-3.0-only
* SPDX-License-Identifier: LGPL-3.0-or-later
*
* Copyright (C) 2022 RainbowDashLabs and Contributor
* Copyright (C) RainbowDashLabs and Contributor
*/

package de.chojo.sadu.conversion;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SPDX-License-Identifier: AGPL-3.0-only
* SPDX-License-Identifier: LGPL-3.0-or-later
*
* Copyright (C) 2022 RainbowDashLabs and Contributor
* Copyright (C) RainbowDashLabs and Contributor
*/

package de.chojo.sadu.jdbc;
Expand Down
Loading

0 comments on commit 34cc648

Please sign in to comment.