fix version and deploy

This commit is contained in:
Dan Mulloy 2023-04-09 20:06:41 -05:00
parent 24204e7515
commit 71af32aa68
No known key found for this signature in database
GPG Key ID: F379C293F178751F
3 changed files with 15 additions and 11 deletions

View File

@ -8,11 +8,10 @@ group = 'com.comphenix.protocol'
version = '5.0.0-SNAPSHOT'
description = 'Provides access to the Minecraft protocol'
// java.sourceCompatibility = JavaVersion.VERSION_17
// java.targetCompatibility = JavaVersion.VERSION_17
def isSnapshot = version.endsWith('-SNAPSHOT')
repositories {
// mavenLocal()
// mavenLocal() // can speed up build, but may fail in CI
mavenCentral()
maven {
@ -41,7 +40,6 @@ dependencies {
compileOnly 'net.kyori:adventure-text-serializer-gson:4.13.0'
compileOnly 'com.googlecode.json-simple:json-simple:1.1.1'
// testImplementation 'org.junit.jupiter:junit-jupiter:5.9.2'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.9.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.2'
testImplementation 'org.mockito:mockito-core:4.11.0'
@ -72,13 +70,12 @@ test {
}
processResources {
def fullVersion = System.getenv('BUILD_NUMBER')
def includeBuild = isSnapshot && System.getenv('BUILD_NUMBER')
def fullVersion = includeBuild
? version + '-' + System.getenv('BUILD_NUMBER')
: version
filter {
it.replace('${project.version}', fullVersion)
}
eachFile { expand(['version': fullVersion]) }
}
publishing {
@ -90,13 +87,18 @@ publishing {
artifactId = 'ProtocolLib'
}
}
}
repositories {
maven {
url = version.endsWith('SNAPSHOT')
url isSnapshot
? 'https://repo.dmulloy2.net/repository/snapshots/'
: 'https://repo.dmulloy2.net/repository/releases/'
credentials {
username project.nexusUsername
password project.nexusPassword
}
}
}
}

2
gradle.properties Normal file
View File

@ -0,0 +1,2 @@
nexusUsername=""
nexusPassword=""

View File

@ -1,5 +1,5 @@
name: ProtocolLib
version: ${project.fullVersion}
version: ${version}
description: Provides read/write access to the Minecraft protocol.
authors: [dmulloy2, comphenix]