From 9c6aaab6167d96a189f47813b6333fa250f9e5c1 Mon Sep 17 00:00:00 2001 From: Robinson Date: Fri, 9 Apr 2021 16:02:04 +0200 Subject: [PATCH] Updated libraries, added updates --- README.md | 15 ++--- build.gradle.kts | 63 ++++++------------- .../cabParser/structure/CabFileEntry.java | 2 +- .../cabParser/structure/CabFolderEntry.java | 2 +- .../cabParser/structure/CabHeader.java | 2 +- .../cabParser/structure/CfDataRecord.java | 2 +- 6 files changed, 28 insertions(+), 58 deletions(-) diff --git a/README.md b/README.md index 6972d97..d6c9b0c 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Specifically, this project was created to extract files from within a .cab which Microsoft CAB file format: http://msdn.microsoft.com/en-us/library/bb417343.aspx -- This is for cross-platform use, specifically - linux 32/64, mac 32/64, and windows 32/64. Java 6+ +- This is for cross-platform use, specifically - linux 32/64, mac 32/64, and windows 32/64. Java 8+ @@ -33,18 +33,15 @@ Maven Info Gradle Info --------- -```` +``` dependencies { ... - compile "com.dorkbox:CabParser:2.15" + implementation("com.dorkbox:CabParser:2.15") } -```` - -Or if you don't want to use Maven, you can access the files directly here: -https://repo1.maven.org/maven2/com/dorkbox/CabParser/ - +``` License --------- -This project is © 2012 dorkbox llc, and is distributed under the terms of the Apache v2.0 License. See file "LICENSE" for further references. +This project is © 2021 dorkbox llc, and is distributed under the terms of the Apache v2.0 License. See file "LICENSE" for further +references. diff --git a/build.gradle.kts b/build.gradle.kts index 6356bfe..2ce768b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright 2020 dorkbox, llc + * Copyright 2021 dorkbox, llc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,34 +14,30 @@ * limitations under the License. */ - import java.time.Instant - /////////////////////////////// ////// PUBLISH TO SONATYPE / MAVEN CENTRAL ////// TESTING : (to local maven repo) <'publish and release' - 'publishToMavenLocal'> ////// RELEASE : (to sonatype/maven central), <'publish and release' - 'publishToSonatypeAndRelease'> /////////////////////////////// -gradle.startParameter.showStacktrace = ShowStacktrace.ALWAYS_FULL // always show the stacktrace! +gradle.startParameter.showStacktrace = ShowStacktrace.ALWAYS // always show the stacktrace! gradle.startParameter.warningMode = WarningMode.All plugins { - java + id("com.dorkbox.Licensing") version "2.5.5" + id("com.dorkbox.VersionUpdate") version "2.3" + id("com.dorkbox.GradleUtils") version "1.17" + id("com.dorkbox.GradlePublish") version "1.10" - id("com.dorkbox.GradleUtils") version "1.8" - id("com.dorkbox.CrossCompile") version "1.0.1" - id("com.dorkbox.Licensing") version "1.4" - id("com.dorkbox.VersionUpdate") version "1.4.1" - id("com.dorkbox.GradlePublish") version "1.2" - - kotlin("jvm") version "1.3.72" + kotlin("jvm") version "1.4.32" } + object Extras { // set for the project - const val description = "Parse and extract data from Microsoft LZX compressed .cab files for Java 6+" + const val description = "Parse and extract data from Microsoft LZX compressed .cab files for Java 8+" const val group = "com.dorkbox" const val version = "2.16" @@ -51,9 +47,8 @@ object Extras { const val vendor = "Dorkbox LLC" const val vendorUrl = "https://dorkbox.com" const val url = "https://git.dorkbox.com/dorkbox/CabParser" - val buildDate = Instant.now().toString() - val JAVA_VERSION = JavaVersion.VERSION_1_6.toString() + val buildDate = Instant.now().toString() } /////////////////////////////// @@ -61,6 +56,8 @@ object Extras { /////////////////////////////// GradleUtils.load("$projectDir/../../gradle.properties", Extras) GradleUtils.fixIntellijPaths() +GradleUtils.defaultResolutionStrategy() +GradleUtils.compileConfiguration(JavaVersion.VERSION_1_8) licensing { license(License.APACHE_2) { @@ -68,18 +65,6 @@ licensing { url(Extras.url) note(Extras.description) } - - - license("Dorkbox Utils", License.APACHE_2) { - author(Extras.vendor) - url("https://git.dorkbox.com/dorkbox/Utilities") - } - - license("jOOU - Unsigned Numbers for Java", License.APACHE_2) { - copyright( 2013) - author("Lukas Eder, lukas.eder@gmail.com") - url("https://github.com/jOOQ/jOOU") - } } sourceSets { @@ -93,21 +78,6 @@ sourceSets { } } -repositories { -// mavenLocal() // this must be first! - jcenter() -} - -/////////////////////////////// -////// Task defaults -/////////////////////////////// -tasks.withType { - options.encoding = "UTF-8" - - sourceCompatibility = Extras.JAVA_VERSION - targetCompatibility = Extras.JAVA_VERSION -} - tasks.jar.get().apply { manifest { // https://docs.oracle.com/javase/tutorial/deployment/jar/packageman.html @@ -125,12 +95,15 @@ tasks.jar.get().apply { } } -tasks.compileJava.get().apply { - println("\tCompiling classes to Java $sourceCompatibility") +repositories { + mavenLocal() // this must be first! + jcenter() } dependencies { - implementation("com.dorkbox:Utilities:1.2") + implementation("com.dorkbox:ByteUtilities:1.0") + implementation("com.dorkbox:Updates:1.0") + implementation("com.dorkbox:Utilities:1.9") } publishToSonatype { diff --git a/src/dorkbox/cabParser/structure/CabFileEntry.java b/src/dorkbox/cabParser/structure/CabFileEntry.java index 593958e..ad04484 100644 --- a/src/dorkbox/cabParser/structure/CabFileEntry.java +++ b/src/dorkbox/cabParser/structure/CabFileEntry.java @@ -22,7 +22,7 @@ import java.util.Date; import dorkbox.cabParser.CabException; import dorkbox.cabParser.CorruptCabException; -import dorkbox.util.bytes.LittleEndian; +import dorkbox.bytes.LittleEndian; public final class CabFileEntry { public static final Charset US_ASCII = Charset.forName("US-ASCII"); diff --git a/src/dorkbox/cabParser/structure/CabFolderEntry.java b/src/dorkbox/cabParser/structure/CabFolderEntry.java index c63f38d..d5ca56a 100644 --- a/src/dorkbox/cabParser/structure/CabFolderEntry.java +++ b/src/dorkbox/cabParser/structure/CabFolderEntry.java @@ -18,7 +18,7 @@ package dorkbox.cabParser.structure; import java.io.IOException; import java.io.InputStream; -import dorkbox.util.bytes.LittleEndian; +import dorkbox.bytes.LittleEndian; public final class CabFolderEntry implements CabConstants { /** offset of the first CFDATA block in this folder, 4bytes */ diff --git a/src/dorkbox/cabParser/structure/CabHeader.java b/src/dorkbox/cabParser/structure/CabHeader.java index c244f83..ea854e0 100644 --- a/src/dorkbox/cabParser/structure/CabHeader.java +++ b/src/dorkbox/cabParser/structure/CabHeader.java @@ -22,7 +22,7 @@ import java.io.InputStream; import dorkbox.cabParser.CabException; import dorkbox.cabParser.CabStreamSaver; import dorkbox.cabParser.CorruptCabException; -import dorkbox.util.bytes.LittleEndian; +import dorkbox.bytes.LittleEndian; public final class CabHeader implements CabConstants { diff --git a/src/dorkbox/cabParser/structure/CfDataRecord.java b/src/dorkbox/cabParser/structure/CfDataRecord.java index 1533690..5fea57a 100644 --- a/src/dorkbox/cabParser/structure/CfDataRecord.java +++ b/src/dorkbox/cabParser/structure/CfDataRecord.java @@ -22,7 +22,7 @@ import java.io.InputStream; import dorkbox.cabParser.CabException; import dorkbox.cabParser.Checksum; import dorkbox.cabParser.CorruptCabException; -import dorkbox.util.bytes.LittleEndian; +import dorkbox.bytes.LittleEndian; public final class CfDataRecord { /** checksum of this CFDATA entry , 4bytes */