diff --git a/HttpStatus.iml b/HttpStatus.iml index 00ab8df..b2c152e 100644 --- a/HttpStatus.iml +++ b/HttpStatus.iml @@ -1,5 +1,5 @@ - + diff --git a/HttpStatus.ipr b/HttpStatus.ipr index 035aed3..4c4641f 100644 --- a/HttpStatus.ipr +++ b/HttpStatus.ipr @@ -1,5 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - + @@ -52,7 +83,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -260,14 +169,14 @@ - + - + diff --git a/build.gradle b/build.gradle index 81231b5..a70ef26 100644 --- a/build.gradle +++ b/build.gradle @@ -18,12 +18,16 @@ def mavenGroupId = 'net.thauvin.erik.httpstatus' def getVersion(isIncrement = false) { - def propsFile = 'buildnumber.properties' - def key = 'build' + def propsFile = 'version.properties' + def majorKey = 'version.major' + def minorKey = 'version.minor' + def patchKey = 'version.patch' + def metaKey = 'version.buildmeta' + def preKey = 'version.prerelease' if (isIncrement) { ant.propertyfile(file: propsFile) { - entry(key: key, + entry(key: patchKey, type: 'int', default: '-1', operation: '+') @@ -31,7 +35,10 @@ def getVersion(isIncrement = false) } def p = new Properties() file(propsFile).withInputStream { stream -> p.load(stream) } - return '1.0.' + p.getProperty(key) + def metadata = p.getProperty(metaKey, '') + def prerelease = p.getProperty(preKey, '') + return (p.getProperty(majorKey, '1') + '.' + p.getProperty(minorKey, '0') + '.' + p.getProperty(patchKey, '0') + + (prerelease.length() > 0 ? '-' + prerelease : '') + (metadata.length() > 0 ? '+' + metadata : '')) } version = getVersion(); @@ -58,7 +65,7 @@ bintray { publications = ['MyPublication'] pkg { repo = 'maven' - name = rootProject.name + name = 'HttpStatus' licenses = ['BSD 3-Clause'] desc = 'HttpStatus JSP Tag Library' websiteUrl = 'https://github.com/ethauvin/HttpStatus' @@ -84,7 +91,7 @@ publishing { artifact sourcesJar artifact javadocJar groupId mavenGroupId - artifactId rootProject.name.toLowerCase() + artifactId rootProject.name version project.version } } @@ -107,7 +114,6 @@ task sourcesJar(type: Jar) { artifacts { archives javadocJar archives sourcesJar - } javadoc { @@ -124,9 +130,6 @@ compileJava { jar { - doFirst { - archiveName = archiveName.toLowerCase() - } manifest.attributes('Main-Class': mainClassName) } @@ -159,8 +162,7 @@ task deploy(dependsOn: ['build', 'copyToDeploy']) { mustRunAfter clean } - -task release(dependsOn: ['deploy']) { +task release(dependsOn: ['deploy', 'wrapper']) << { group = "Publishing" description = "Releases new version." isRelease = true diff --git a/buildnumber.properties b/buildnumber.properties deleted file mode 100644 index daa5083..0000000 --- a/buildnumber.properties +++ /dev/null @@ -1,2 +0,0 @@ -#Mon, 18 Jan 2016 22:24:22 -0800 -build=2 diff --git a/settings.gradle b/settings.gradle index 160def1..b28649f 100644 --- a/settings.gradle +++ b/settings.gradle @@ -16,4 +16,4 @@ include 'api' include 'services:webservice' */ -rootProject.name = 'HttpStatus' \ No newline at end of file +rootProject.name = 'httpstatus' \ No newline at end of file diff --git a/version.properties b/version.properties new file mode 100644 index 0000000..f6860a7 --- /dev/null +++ b/version.properties @@ -0,0 +1,5 @@ +version.major=1 +version.minor=0 +version.patch=1 +version.buildmeta= +version.prerelease= \ No newline at end of file