updated version dep + other build deps
parent
93b65da5a0
commit
e9ae8216b2
30
LICENSE
30
LICENSE
|
@ -23,7 +23,7 @@
|
||||||
- OS - Information about the system, Java runtime, OS, Window Manager, and Desktop Environment.
|
- OS - Information about the system, Java runtime, OS, Window Manager, and Desktop Environment.
|
||||||
[The Apache Software License, Version 2.0]
|
[The Apache Software License, Version 2.0]
|
||||||
https://git.dorkbox.com/dorkbox/OS
|
https://git.dorkbox.com/dorkbox/OS
|
||||||
Copyright 2022
|
Copyright 2023
|
||||||
Dorkbox LLC
|
Dorkbox LLC
|
||||||
|
|
||||||
Extra license information
|
Extra license information
|
||||||
|
@ -50,13 +50,37 @@
|
||||||
Kotlin Compiler, Test Data+Libraries, and Tools repository contain third-party code, to which different licenses may apply
|
Kotlin Compiler, Test Data+Libraries, and Tools repository contain third-party code, to which different licenses may apply
|
||||||
See: https://github.com/JetBrains/kotlin/blob/master/license/README.md
|
See: https://github.com/JetBrains/kotlin/blob/master/license/README.md
|
||||||
|
|
||||||
- Version - Java Semantic Versioning with exceptions. Minor/Patch number optional and build-after-final-dot (minor/patch) permitted.
|
- Version - Java Semantic Versioning with exceptions.
|
||||||
[MIT License]
|
[MIT License]
|
||||||
https://git.dorkbox.com/dorkbox/Version
|
https://git.dorkbox.com/dorkbox/Version
|
||||||
Copyright 2020
|
Copyright 2023
|
||||||
Dorkbox LLC
|
Dorkbox LLC
|
||||||
G. Richard Bellamy
|
G. Richard Bellamy
|
||||||
Kenduck
|
Kenduck
|
||||||
Larry Bordowitz <lbordowitz@yahoo-inc.com>
|
Larry Bordowitz <lbordowitz@yahoo-inc.com>
|
||||||
Martin Rüegg <martin.rueegg@bristolpound.org> <martin.rueegg@metaworx.ch>
|
Martin Rüegg <martin.rueegg@bristolpound.org> <martin.rueegg@metaworx.ch>
|
||||||
Zafar Khaja <zafarkhaja@gmail.com>
|
Zafar Khaja <zafarkhaja@gmail.com>
|
||||||
|
|
||||||
|
Extra license information
|
||||||
|
- Kotlin -
|
||||||
|
[The Apache Software License, Version 2.0]
|
||||||
|
https://github.com/JetBrains/kotlin
|
||||||
|
Copyright 2020
|
||||||
|
JetBrains s.r.o. and Kotlin Programming Language contributors
|
||||||
|
Kotlin Compiler, Test Data+Libraries, and Tools repository contain third-party code, to which different licenses may apply
|
||||||
|
See: https://github.com/JetBrains/kotlin/blob/master/license/README.md
|
||||||
|
|
||||||
|
- Updates - Software Update Management
|
||||||
|
[The Apache Software License, Version 2.0]
|
||||||
|
https://git.dorkbox.com/dorkbox/Updates
|
||||||
|
Copyright 2021
|
||||||
|
Dorkbox LLC
|
||||||
|
|
||||||
|
Extra license information
|
||||||
|
- Kotlin -
|
||||||
|
[The Apache Software License, Version 2.0]
|
||||||
|
https://github.com/JetBrains/kotlin
|
||||||
|
Copyright 2020
|
||||||
|
JetBrains s.r.o. and Kotlin Programming Language contributors
|
||||||
|
Kotlin Compiler, Test Data+Libraries, and Tools repository contain third-party code, to which different licenses may apply
|
||||||
|
See: https://github.com/JetBrains/kotlin/blob/master/license/README.md
|
||||||
|
|
|
@ -23,9 +23,9 @@ plugins {
|
||||||
|
|
||||||
id("com.gradle.plugin-publish") version "1.1.0"
|
id("com.gradle.plugin-publish") version "1.1.0"
|
||||||
|
|
||||||
id("com.dorkbox.Licensing") version "2.17"
|
id("com.dorkbox.Licensing") version "2.20"
|
||||||
id("com.dorkbox.VersionUpdate") version "2.5"
|
id("com.dorkbox.VersionUpdate") version "2.6"
|
||||||
id("com.dorkbox.GradleUtils") version "3.4"
|
id("com.dorkbox.GradleUtils") version "3.10"
|
||||||
|
|
||||||
kotlin("jvm") version "1.7.20"
|
kotlin("jvm") version "1.7.20"
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ object Extras {
|
||||||
// set for the project
|
// set for the project
|
||||||
const val description = "Gradle Plugin to manage various Gradle tasks, such as updating gradle and dependencies"
|
const val description = "Gradle Plugin to manage various Gradle tasks, such as updating gradle and dependencies"
|
||||||
const val group = "com.dorkbox"
|
const val group = "com.dorkbox"
|
||||||
const val version = "3.9"
|
const val version = "3.10"
|
||||||
|
|
||||||
// set as project.ext
|
// set as project.ext
|
||||||
const val name = "Gradle Utils"
|
const val name = "Gradle Utils"
|
||||||
|
@ -49,8 +49,7 @@ object Extras {
|
||||||
///// assign 'Extras'
|
///// assign 'Extras'
|
||||||
///////////////////////////////
|
///////////////////////////////
|
||||||
GradleUtils.load("$projectDir/../../gradle.properties", Extras)
|
GradleUtils.load("$projectDir/../../gradle.properties", Extras)
|
||||||
GradleUtils.fixIntellijPaths()
|
GradleUtils.defaults()
|
||||||
GradleUtils.defaultResolutionStrategy()
|
|
||||||
GradleUtils.compileConfiguration(JavaVersion.VERSION_1_8)
|
GradleUtils.compileConfiguration(JavaVersion.VERSION_1_8)
|
||||||
|
|
||||||
|
|
||||||
|
@ -62,20 +61,7 @@ licensing {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
|
||||||
main {
|
|
||||||
java {
|
|
||||||
setSrcDirs(listOf("src"))
|
|
||||||
|
|
||||||
// want to include kotlin files for the source. 'setSrcDirs' resets includes...
|
|
||||||
include("**/*.kt")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenLocal()
|
|
||||||
mavenCentral()
|
|
||||||
gradlePluginPortal()
|
gradlePluginPortal()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,13 +72,13 @@ dependencies {
|
||||||
compileOnly("org.jetbrains.kotlin:kotlin-gradle-plugin")
|
compileOnly("org.jetbrains.kotlin:kotlin-gradle-plugin")
|
||||||
|
|
||||||
// for easier OS identification
|
// for easier OS identification
|
||||||
implementation("com.dorkbox:OS:1.1")
|
implementation("com.dorkbox:OS:1.6")
|
||||||
|
|
||||||
// for parsing JSON
|
// for parsing JSON
|
||||||
implementation("org.json:json:20220924")
|
implementation("org.json:json:20220924")
|
||||||
|
|
||||||
// for parsing version information from maven
|
// for parsing version information from maven
|
||||||
implementation("com.dorkbox:Version:2.4")
|
implementation("com.dorkbox:Version:3.0")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.jar.get().apply {
|
tasks.jar.get().apply {
|
||||||
|
|
|
@ -16,16 +16,15 @@
|
||||||
|
|
||||||
package dorkbox.gradle.deps
|
package dorkbox.gradle.deps
|
||||||
|
|
||||||
import com.dorkbox.version.Version
|
|
||||||
import dorkbox.gradle.StaticMethodsAndTools
|
import dorkbox.gradle.StaticMethodsAndTools
|
||||||
|
import dorkbox.version.Version
|
||||||
import org.gradle.api.DefaultTask
|
import org.gradle.api.DefaultTask
|
||||||
import org.gradle.api.Project
|
import org.gradle.api.Project
|
||||||
import org.gradle.api.tasks.TaskAction
|
import org.gradle.api.tasks.TaskAction
|
||||||
import java.io.InputStreamReader
|
import java.io.InputStreamReader
|
||||||
import java.net.URL
|
import java.net.URL
|
||||||
import java.util.concurrent.Executors
|
import java.util.concurrent.*
|
||||||
import java.util.concurrent.Future
|
import java.util.concurrent.locks.*
|
||||||
import java.util.concurrent.locks.ReentrantReadWriteLock
|
|
||||||
import kotlin.concurrent.write
|
import kotlin.concurrent.write
|
||||||
|
|
||||||
open class
|
open class
|
||||||
|
@ -34,13 +33,14 @@ GetVersionInfoTask : DefaultTask() {
|
||||||
var dirtyVersions = false
|
var dirtyVersions = false
|
||||||
|
|
||||||
fun updateReleaseVersion(version: String) {
|
fun updateReleaseVersion(version: String) {
|
||||||
if (release == null) {
|
val curRelease = release
|
||||||
|
if (curRelease == null) {
|
||||||
release = version
|
release = version
|
||||||
} else {
|
} else {
|
||||||
// there can be errors when parsing version info, since not all version strings follow semantic versioning
|
// there can be errors when parsing version info, since not all version strings follow semantic versioning
|
||||||
try {
|
try {
|
||||||
val currentVersion = Version.from(release)
|
val currentVersion = Version(curRelease)
|
||||||
val releaseVer = Version.from(version)
|
val releaseVer = Version(version)
|
||||||
|
|
||||||
if (releaseVer.greaterThan(currentVersion)) {
|
if (releaseVer.greaterThan(currentVersion)) {
|
||||||
release = version
|
release = version
|
||||||
|
@ -67,11 +67,11 @@ GetVersionInfoTask : DefaultTask() {
|
||||||
try {
|
try {
|
||||||
// this creates a LOT of version objects. Probably better to store these in a list, however we want all backing data
|
// this creates a LOT of version objects. Probably better to store these in a list, however we want all backing data
|
||||||
// structures to be strings.
|
// structures to be strings.
|
||||||
val curVersion = Version.from(currentVersion)
|
val curVersion = Version(currentVersion)
|
||||||
return versions.sortedWith { o1, o2 ->
|
return versions.sortedWith { o1, o2 ->
|
||||||
Version.from(o1).compareTo(Version.from(o2))
|
Version(o1).compareTo(Version(o2))
|
||||||
}.filter {
|
}.filter {
|
||||||
Version.from(it).greaterThan(curVersion)
|
Version(it).greaterThan(curVersion)
|
||||||
}.toList()
|
}.toList()
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
// WHOOPS! There was an invalid version number! Instead of just crashing, try a different way...
|
// WHOOPS! There was an invalid version number! Instead of just crashing, try a different way...
|
||||||
|
|
Loading…
Reference in New Issue