Skip to content

Commit

Permalink
prepare new major release in version 3
Browse files Browse the repository at this point in the history
  • Loading branch information
astrapi69 committed Dec 22, 2023
1 parent fb7889b commit c1a50d5
Show file tree
Hide file tree
Showing 21 changed files with 109 additions and 91 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'temurin'
- name: Build with Gradle
uses: gradle/gradle-build-action@bc3340afc5e3cc44f2321809ac090d731c13c514
with:
arguments: build
env:
ossrhUsername: ${{secrets.OSSRHUSERNAME}}
ossrhPassword: ${{secrets.OSSRHPASSWORD}}
- uses: codecov/codecov-action@v2
with:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Build with Gradle
uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7
with:
arguments: build
env:
ossrhUsername: ${{secrets.OSSRHUSERNAME}}
ossrhPassword: ${{secrets.OSSRHPASSWORD}}
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
## Change log
----------------------

Version 2.3-SNAPSHOT
Version 3-SNAPSHOT
-------------

CHANGED:

- update to jdk version 17
- update gradle to new version 8.5
- update of gradle-plugin dependency 'com.github.ben-manes.versions.gradle.plugin' to new version 0.50.0
- update of gradle-plugin dependency 'org.ajoberstar.grgit:grgit-gradle' to new minor version 5.2.1
- update of gradle-plugin dependency 'com.diffplug.spotless:spotless-plugin-gradle' to new minor version 6.23.3
- update of dependency crypt-api to new version to 8.7
- update of test dependency file-worker to new minor version 17.1
- update of test dependency test-objects to new minor version 8.2
- update of test dependency 'com.github.meanbeanlib:meanbean' to new version 3.0.0-M9
- update of test dependency testng to new patch version 7.8.0


Version 2.2
Expand Down
5 changes: 4 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ apply from: "gradle/packaging.gradle"
apply from: "gradle/publishing.gradle"
apply from: "gradle/repositories.gradle"
apply from: "gradle/testing.gradle"
sourceCompatibility = "$projectSourceCompatibility" as Object

java {
sourceCompatibility = "$projectSourceCompatibility" as Object
}

tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
Expand Down
20 changes: 10 additions & 10 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
######################
# project properties #
######################
projectVersion=2.3-SNAPSHOT
projectVersion=3-SNAPSHOT
groupPackage=io.github.astrapi69
projectSourceCompatibility=11
projectSourceCompatibility=17
projectInceptionYear=2015
projectHolderUsername=astrapi69
projectLeaderName=Asterios Raptis
Expand All @@ -28,21 +28,21 @@ projectRepositoriesPasswordKey=ossrhPassword
###########################
# gradle-plugins versions #
###########################
gradlePluginVersionsVersion=0.43.0
gradlePluginVersionsVersion=0.50.0
licenseGradlePluginVersion=0.16.1
grgitGradlePluginVersion=5.0.0
spotlessGradlePluginVersion=6.11.0
grgitGradlePluginVersion=5.2.1
spotlessGradlePluginVersion=6.23.3
#########################
# dependencies versions #
#########################
cryptApiVersion=8.4
cryptApiVersion=8.7
##############################
# test dependencies versions #
##############################
fileWorkerVersion=11.5
testObjectVersion=7.2
meanbeanVersion=2.0.3
testngVersion=7.6.1
fileWorkerVersion=17.1
testObjectVersion=8.2
meanbeanVersion=3.0.0-M9
testngVersion=7.8.0
##########################
# for deploy on sonatype #
##########################
Expand Down
2 changes: 1 addition & 1 deletion gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ dependencies {
implementation("io.github.astrapi69:crypt-api:$cryptApiVersion")
testImplementation("io.github.astrapi69:file-worker:$fileWorkerVersion")
testImplementation("io.github.astrapi69:test-object:$testObjectVersion")
testImplementation("org.meanbean:meanbean:$meanbeanVersion")
testImplementation("com.github.meanbeanlib:meanbean:$meanbeanVersion")
testImplementation("org.testng:testng:$testngVersion")
}
6 changes: 4 additions & 2 deletions gradle/formatting.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

spotless {

format "misc", {
Expand All @@ -11,6 +10,9 @@ spotless {
endWithNewline()
}
java {
eclipse("4.19.0").configFile("src/test/resources/alpharo-formatter.xml")
// export config file: https://github.com/diffplug/spotless/blob/main/ECLIPSE_SCREENSHOTS.md#creating-spotlessimportorder
importOrderFile('src/test/resources/spotless/importorder.properties')
// import order file as exported from eclipse
eclipse("4.21").configFile("src/test/resources/spotless/alpharo-formatter.xml")
}
}
1 change: 1 addition & 0 deletions gradle/licensing.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ license {
"**/*.dtd",
"**/*.html",
"**/*.jsp",
"**/package-info.java",
"**/*.jpa",
"**/*.sql",
"**/*.properties",
Expand Down
4 changes: 3 additions & 1 deletion gradle/publishing.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ task sourcesJar(type: Jar) {
task javadocJar(type: Jar) {
from javadoc
archiveClassifier.set("javadoc")
javadoc.properties.failOnError = true
javadoc {
failOnError = false
}
}

javadoc {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Fri Feb 21 14:04:35 CET 2020
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
*/
package io.github.astrapi69.checksum;

import static io.github.astrapi69.checksum.ByteArrayChecksumExtensions.encodeHex;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Objects;

import static io.github.astrapi69.checksum.ByteArrayChecksumExtensions.encodeHex;

public class DirectoryChecksum
{
MessageDigest messageDigest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,16 @@
*/
package io.github.astrapi69.checksum;

import io.github.astrapi69.crypt.api.algorithm.Algorithm;

import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Objects;
import java.util.zip.Adler32;
import java.util.zip.CRC32;
import java.util.zip.CheckedInputStream;

import io.github.astrapi69.crypt.api.algorithm.Algorithm;

/**
* The class {@link FileChecksumExtensions} provides algorithms for computing checksum from files
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
*/
package io.github.astrapi69.checksum;

import io.github.astrapi69.crypt.api.algorithm.Algorithm;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

import io.github.astrapi69.crypt.api.algorithm.Algorithm;

/**
* The class {@link StringChecksumExtensions} provides algorithms for computing checksum from string
* objects
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/io/github/astrapi69/checksum/package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/**
*
* This package provides helper classes for calculate checksum from byte arrays, files, string and
* objects
*/
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
module checksum.up {
module checksum.up
{
requires crypt.api;

exports io.github.astrapi69.checksum;
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
import java.nio.charset.StandardCharsets;
import java.security.NoSuchAlgorithmException;

import io.github.astrapi69.crypt.api.algorithm.ChecksumAlgorithm;
import org.meanbean.test.BeanTester;
import org.testng.annotations.Test;

import io.github.astrapi69.AbstractTestCase;
import io.github.astrapi69.crypt.api.algorithm.Algorithm;
import io.github.astrapi69.crypt.api.algorithm.ChecksumAlgorithm;
import io.github.astrapi69.test.base.AbstractTestCase;

/**
* The unit test class for the class {@link ByteArrayChecksumExtensions}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@
import org.meanbean.test.BeanTester;
import org.testng.annotations.Test;

import io.github.astrapi69.AbstractTestCase;
import io.github.astrapi69.crypt.api.algorithm.Algorithm;
import io.github.astrapi69.crypt.api.algorithm.ChecksumAlgorithm;
import io.github.astrapi69.crypt.api.algorithm.HashAlgorithm;
import io.github.astrapi69.crypt.api.algorithm.MdAlgorithm;
import io.github.astrapi69.test.base.AbstractTestCase;

/**
* The unit test class for the class {@link ByteArrayChecksumExtensions}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
import java.io.IOException;
import java.security.NoSuchAlgorithmException;

import io.github.astrapi69.crypt.api.algorithm.ChecksumAlgorithm;
import org.meanbean.test.BeanTester;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

import io.github.astrapi69.AbstractTestCase;
import io.github.astrapi69.crypt.api.algorithm.Algorithm;
import io.github.astrapi69.crypt.api.algorithm.ChecksumAlgorithm;
import io.github.astrapi69.file.search.PathFinder;
import io.github.astrapi69.test.base.AbstractTestCase;

/**
* The unit test class for the class {@link FileChecksumExtensions}
Expand Down Expand Up @@ -283,46 +283,46 @@ public void testGetChecksumFileStringWithDirectory()
int expectedLength;
int actualLength;
File srcTestResourcesDir = PathFinder.getSrcTestResourcesDir();
expected = "b6ed34c32fbb03757de0dbb1be149b03";
expected = "8350e5a3e24c153df2275c9f80692773";
actual = FileChecksumExtensions.getChecksum(srcTestResourcesDir,
ChecksumAlgorithm.MD2.getAlgorithm());
assertEquals(expected, actual);
actualLength = actual.length();
expectedLength = 32;
assertEquals(expectedLength, actualLength);

expected = "34a863c18dd458a32ca56dd9b74695ae";
expected = "d41d8cd98f00b204e9800998ecf8427e";
actual = FileChecksumExtensions.getChecksum(srcTestResourcesDir,
ChecksumAlgorithm.MD5.getAlgorithm());
assertEquals(expected, actual);
actualLength = actual.length();
assertEquals(expectedLength, actualLength);

expected = "7a26a3b640a61ce9f6aaa3cfbb760bb0e8000f69";
expected = "da39a3ee5e6b4b0d3255bfef95601890afd80709";
actual = FileChecksumExtensions.getChecksum(srcTestResourcesDir,
ChecksumAlgorithm.SHA_1.getAlgorithm());
assertEquals(expected, actual);
actualLength = actual.length();
expectedLength = 40;
assertEquals(expectedLength, actualLength);

expected = "530cf62c85fd570bf1262c5339f360d3067f2a05abf08e381a9315be0f4f1ed0";
expected = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";
actual = FileChecksumExtensions.getChecksum(srcTestResourcesDir,
ChecksumAlgorithm.SHA_256.getAlgorithm());
assertEquals(expected, actual);
actualLength = actual.length();
expectedLength = 64;
assertEquals(expectedLength, actualLength);

expected = "a36d562510c2386c2a6579818472df7f6a5b4a66d956aae85644e16e3a9dce4ccaa5a4805401828d73478b94c6884386";
expected = "38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b";
actual = FileChecksumExtensions.getChecksum(srcTestResourcesDir,
ChecksumAlgorithm.SHA_384.getAlgorithm());
assertEquals(expected, actual);
actualLength = actual.length();
expectedLength = 96;
assertEquals(expectedLength, actualLength);

expected = "1b52fe0c4a775540b6fb1fdeaed770abdd747f5918d9b3cb11b2d37ae9341b99bf68f3f9eb5cec34eee49786efef0d38bbd31c90b764aea6ab74d9d544dd4acd";
expected = "cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e";
actual = FileChecksumExtensions.getChecksum(srcTestResourcesDir,
ChecksumAlgorithm.SHA_512.getAlgorithm());
assertEquals(expected, actual);
Expand Down

0 comments on commit c1a50d5

Please sign in to comment.