Updated to use Gradle Utils for gradle/project update management
This commit is contained in:
parent
f87392e4ca
commit
25c8bbe2f3
@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
|
||||
import java.time.Instant
|
||||
import java.util.*
|
||||
import kotlin.collections.component1
|
||||
@ -39,14 +38,13 @@ plugins {
|
||||
`maven-publish`
|
||||
|
||||
// close and release on sonatype
|
||||
id("de.marcphilipp.nexus-publish") version "0.2.0"
|
||||
id("io.codearte.nexus-staging") version "0.20.0"
|
||||
|
||||
id("com.dorkbox.CrossCompile") version "1.0.1"
|
||||
id("com.dorkbox.Licensing") version "1.4"
|
||||
id("com.dorkbox.VersionUpdate") version "1.4.1"
|
||||
|
||||
// setup checking for the latest version of a plugin or dependency
|
||||
id("com.github.ben-manes.versions") version "0.20.0"
|
||||
id("com.dorkbox.GradleUtils") version "1.0"
|
||||
|
||||
kotlin("jvm") version "1.3.11"
|
||||
}
|
||||
@ -311,7 +309,7 @@ dependencies {
|
||||
implementation("net.java.dev.jna:jna:$jnaVersion")
|
||||
implementation("net.java.dev.jna:jna-platform:$jnaVersion")
|
||||
|
||||
|
||||
runtime("com.koloboke:koloboke-impl-jdk8:1.0.0")
|
||||
|
||||
// unit testing
|
||||
testCompile("junit:junit:4.12")
|
||||
@ -416,6 +414,12 @@ publishing {
|
||||
}
|
||||
}
|
||||
|
||||
nexusPublishing {
|
||||
packageGroup.set("com.dorkbox")
|
||||
username.set(Extras.sonatypeUserName)
|
||||
password.set(Extras.sonatypePassword)
|
||||
}
|
||||
|
||||
nexusStaging {
|
||||
username = Extras.sonatypeUserName
|
||||
password = Extras.sonatypePassword
|
||||
@ -425,34 +429,7 @@ signing {
|
||||
sign(publishing.publications["maven"])
|
||||
}
|
||||
|
||||
///////////////////////////////
|
||||
///// Prevent anything other than a release from showing version updates
|
||||
//// https://github.com/ben-manes/gradle-versions-plugin/blob/master/README.md
|
||||
///////////////////////////////
|
||||
tasks.named<DependencyUpdatesTask>("dependencyUpdates") {
|
||||
resolutionStrategy {
|
||||
componentSelection {
|
||||
all {
|
||||
val rejected = listOf("alpha", "beta", "rc", "cr", "m", "preview")
|
||||
.map { qualifier -> Regex("(?i).*[.-]$qualifier[.\\d-]*") }
|
||||
.any { it.matches(candidate.version) }
|
||||
if (rejected) {
|
||||
reject("Release candidate")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// optional parameters
|
||||
checkForGradleUpdate = true
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////
|
||||
////// Gradle Wrapper Configuration.
|
||||
///// Run this task, then refresh the gradle project
|
||||
///////////////////////////////
|
||||
val wrapperUpdate by tasks.creating(Wrapper::class) {
|
||||
gradleVersion = "5.3"
|
||||
distributionUrl = distributionUrl.replace("bin", "all")
|
||||
task<Task>("publishAndRelease") {
|
||||
group = "publish and release"
|
||||
dependsOn(tasks["publishToNexus"], tasks["closeAndReleaseRepository"])
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user