Compare commits
4 Commits
Version_1.
...
master
Author | SHA1 | Date |
---|---|---|
Robinson | 23b9a4f7ff | |
Robinson | bc5c28ef08 | |
Robinson | 81588e2a8e | |
Robinson | da9c34b538 |
|
@ -17,7 +17,7 @@ Maven Info
|
|||
<dependency>
|
||||
<groupId>com.dorkbox</groupId>
|
||||
<artifactId>Utilities</artifactId>
|
||||
<version>1.47</version>
|
||||
<version>1.48</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
```
|
||||
|
@ -27,7 +27,7 @@ Gradle Info
|
|||
```
|
||||
dependencies {
|
||||
...
|
||||
compile "com.dorkbox:Utilities:1.47"
|
||||
compile "com.dorkbox:Utilities:1.48"
|
||||
}
|
||||
```
|
||||
|
||||
|
|
|
@ -23,19 +23,19 @@
|
|||
gradle.startParameter.showStacktrace = ShowStacktrace.ALWAYS // always show the stacktrace!
|
||||
|
||||
plugins {
|
||||
id("com.dorkbox.GradleUtils") version "3.17"
|
||||
id("com.dorkbox.Licensing") version "2.26"
|
||||
id("com.dorkbox.GradleUtils") version "3.18"
|
||||
id("com.dorkbox.Licensing") version "2.28"
|
||||
id("com.dorkbox.VersionUpdate") version "2.8"
|
||||
id("com.dorkbox.GradlePublish") version "1.18"
|
||||
id("com.dorkbox.GradlePublish") version "1.20"
|
||||
|
||||
kotlin("jvm") version "1.8.0"
|
||||
kotlin("jvm") version "1.9.0"
|
||||
}
|
||||
|
||||
object Extras {
|
||||
// set for the project
|
||||
const val description = "Utilities for use within Java projects"
|
||||
const val group = "com.dorkbox"
|
||||
const val version = "1.47"
|
||||
const val version = "1.48"
|
||||
|
||||
// set as project.ext
|
||||
const val name = "Utilities"
|
||||
|
|
|
@ -138,11 +138,10 @@ class CacheUtil(private val tempDir: String = "cache") {
|
|||
@Throws(IOException::class)
|
||||
fun save(cacheName: String?, fileName: String): File {
|
||||
// if we already have this fileName, reuse it
|
||||
val newFile = if (cacheName == null) {
|
||||
makeCacheFile(fileName)
|
||||
} else {
|
||||
makeCacheFile(cacheName)
|
||||
}
|
||||
@Suppress("NAME_SHADOWING")
|
||||
val cacheName = cacheName ?: fileName
|
||||
|
||||
val newFile = makeCacheFile(cacheName)
|
||||
|
||||
// if this file already exists (via HASH), we just reuse what is saved on disk.
|
||||
if (newFile.canRead() && newFile.isFile) {
|
||||
|
@ -184,11 +183,10 @@ class CacheUtil(private val tempDir: String = "cache") {
|
|||
@Throws(IOException::class)
|
||||
fun save(cacheName: String?, fileResource: URL): File {
|
||||
// if we already have this fileName, reuse it
|
||||
val newFile = if (cacheName == null) {
|
||||
makeCacheFile(fileResource.path)
|
||||
} else {
|
||||
makeCacheFile(cacheName)
|
||||
}
|
||||
@Suppress("NAME_SHADOWING")
|
||||
val cacheName = cacheName ?: fileResource.path
|
||||
|
||||
val newFile = makeCacheFile(cacheName)
|
||||
|
||||
// if this file already exists (via HASH), we just reuse what is saved on disk.
|
||||
if (newFile.canRead() && newFile.isFile) {
|
||||
|
@ -218,11 +216,10 @@ class CacheUtil(private val tempDir: String = "cache") {
|
|||
@Throws(IOException::class)
|
||||
fun save(cacheName: String?, fileStream: InputStream): File {
|
||||
// if we already have this fileName, reuse it
|
||||
val newFile = if (cacheName == null) {
|
||||
makeCacheFile(createNameAsHash(fileStream))
|
||||
} else {
|
||||
makeCacheFile(cacheName)
|
||||
}
|
||||
@Suppress("NAME_SHADOWING")
|
||||
val cacheName = cacheName ?: createNameAsHash(fileStream)
|
||||
|
||||
val newFile = makeCacheFile(cacheName)
|
||||
|
||||
// if this file already exists (via HASH), we just reuse what is saved on disk.
|
||||
return if (newFile.canRead() && newFile.isFile) {
|
||||
|
@ -239,13 +236,7 @@ class CacheUtil(private val tempDir: String = "cache") {
|
|||
* @return the full path of the resource copied to disk, or NULL if invalid
|
||||
*/
|
||||
@Throws(IOException::class)
|
||||
private fun makeFileViaStream(cacheName: String?, resourceStream: InputStream?): File {
|
||||
if (resourceStream == null) {
|
||||
throw NullPointerException("resourceStream")
|
||||
}
|
||||
if (cacheName == null) {
|
||||
throw NullPointerException("cacheName")
|
||||
}
|
||||
private fun makeFileViaStream(cacheName: String, resourceStream: InputStream): File {
|
||||
val newFile = makeCacheFile(cacheName)
|
||||
|
||||
// if this file already exists (via HASH), we just reuse what is saved on disk.
|
||||
|
|
|
@ -26,7 +26,7 @@ object Sys {
|
|||
/**
|
||||
* Gets the version number.
|
||||
*/
|
||||
val version = "1.47"
|
||||
val version = "1.48"
|
||||
|
||||
init {
|
||||
// Add this project to the updates system, which verifies this class + UUID + version information
|
||||
|
|
Loading…
Reference in New Issue