Added bintray publishing.
This commit is contained in:
parent
ce8833ca53
commit
51a03bde4c
6 changed files with 158 additions and 133 deletions
119
HttpStatus.iml
119
HttpStatus.iml
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module external.linked.project.id="HttpStatus" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="1.0" type="JAVA_MODULE" version="4">
|
||||
<module external.linked.project.id="HttpStatus" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="1.0.1" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="false">
|
||||
<output url="file://$MODULE_DIR$/build/classes/main" />
|
||||
<output-test url="file://$MODULE_DIR$/build/classes/test" />
|
||||
|
@ -14,117 +14,12 @@
|
|||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module-library">
|
||||
<library name="Gradle: servletapi:servlet-api:2.4-20040521">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/servletapi/servlet-api/2.4-20040521/d66b0e9c78a90552042ab6f9f2f0afb1d87a268f/servlet-api-2.4-20040521.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Gradle: javax.servlet.jsp:jsp-api:2.2.1-b03">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/javax.servlet.jsp/jsp-api/2.2.1-b03/c7205b380e9ceb4b96745656755f31f76ae01b74/jsp-api-2.2.1-b03.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Gradle: javax.servlet:servlet-api:2.4-20040521">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/javax.servlet/servlet-api/2.4-20040521/d66b0e9c78a90552042ab6f9f2f0afb1d87a268f/servlet-api-2.4-20040521.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library" scope="TEST">
|
||||
<library name="Gradle: org.testng:testng:6.9.9">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.testng/testng/6.9.9/1bf509349476d6a48978cc2b04af9caa907781ab/testng-6.9.9.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.testng/testng/6.9.9/45c07e00b4cea80ac8715deb749a54d784f7cb6/testng-6.9.9-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library" scope="TEST">
|
||||
<library name="Gradle: junit:junit:4.10">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/junit/junit/4.10/e4f1766ce7404a08f45d859fb9c226fc9e41a861/junit-4.10.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/junit/junit/4.10/6c98d6766e72d5575f96c9479d1c1d3b865c6e25/junit-4.10-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library" scope="TEST">
|
||||
<library name="Gradle: com.beust:jcommander:1.48">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.beust/jcommander/1.48/bfcb96281ea3b59d626704f74bc6d625ff51cbce/jcommander-1.48.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.beust/jcommander/1.48/6deefcf90f144dfca29d4950c665a592ba029d42/jcommander-1.48-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library" scope="TEST">
|
||||
<library name="Gradle: org.apache.ant:ant:1.7.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.ant/ant/1.7.0/9746af1a485e50cf18dcb232489032a847067066/ant-1.7.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.ant/ant/1.7.0/58ec0e378f1d33cb72a92ee3a9442909789090db/ant-1.7.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library" scope="TEST">
|
||||
<library name="Gradle: org.yaml:snakeyaml:1.15">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.yaml/snakeyaml/1.15/3b132bea69e8ee099f416044970997bde80f4ea6/snakeyaml-1.15.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.yaml/snakeyaml/1.15/7dc55271cad1cf73bb495e372164269e75d9345a/snakeyaml-1.15-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library" scope="TEST">
|
||||
<library name="Gradle: org.beanshell:bsh:2.0b4">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.beanshell/bsh/2.0b4/a05f0a0feefa8d8467ac80e16e7de071489f0d9c/bsh-2.0b4.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library" scope="TEST">
|
||||
<library name="Gradle: org.hamcrest:hamcrest-core:1.1">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-core/1.1/860340562250678d1a344907ac75754e259cdb14/hamcrest-core-1.1.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-core/1.1/2ccf1154d1a8936042a8a742dc3e611d02ac7213/hamcrest-core-1.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library" scope="TEST">
|
||||
<library name="Gradle: org.apache.ant:ant-launcher:1.7.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.ant/ant-launcher/1.7.0/e7e30789211e074aa70ef3eaea59bd5b22a7fa7a/ant-launcher-1.7.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="library" name="Gradle: servletapi:servlet-api:2.4-20040521" level="project" />
|
||||
<orderEntry type="library" name="Gradle: javax.servlet.jsp:jsp-api:2.2.1-b03" level="project" />
|
||||
<orderEntry type="library" name="Gradle: javax.servlet:servlet-api:2.4-20040521" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: org.testng:testng:6.9.10" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: com.beust:jcommander:1.48" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: org.beanshell:bsh:2.0b4" level="project" />
|
||||
</component>
|
||||
<component name="org.twodividedbyzero.idea.findbugs">
|
||||
<option name="_basePreferences">
|
||||
|
|
|
@ -269,6 +269,56 @@
|
|||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
<component name="libraryTable">
|
||||
<library name="Gradle: com.beust:jcommander:1.48">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.beust/jcommander/1.48/bfcb96281ea3b59d626704f74bc6d625ff51cbce/jcommander-1.48.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.beust/jcommander/1.48/6deefcf90f144dfca29d4950c665a592ba029d42/jcommander-1.48-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
<library name="Gradle: javax.servlet.jsp:jsp-api:2.2.1-b03">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/javax.servlet.jsp/jsp-api/2.2.1-b03/c7205b380e9ceb4b96745656755f31f76ae01b74/jsp-api-2.2.1-b03.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/javax.servlet.jsp/jsp-api/2.2.1-b03/5ee3f521021fd5d8c0a89a208a228c1ab10ef854/jsp-api-2.2.1-b03-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
<library name="Gradle: javax.servlet:servlet-api:2.4-20040521">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/javax.servlet/servlet-api/2.4-20040521/d66b0e9c78a90552042ab6f9f2f0afb1d87a268f/servlet-api-2.4-20040521.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
<library name="Gradle: org.beanshell:bsh:2.0b4">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.beanshell/bsh/2.0b4/a05f0a0feefa8d8467ac80e16e7de071489f0d9c/bsh-2.0b4.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
<library name="Gradle: org.testng:testng:6.9.10">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.testng/testng/6.9.10/6feb3e964aeb7097aff30c372aac3ec0f8d87ede/testng-6.9.10.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.testng/testng/6.9.10/11af8613a6b909307c7f2f554249c7b176cb50e6/testng-6.9.10-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
<library name="Gradle: servletapi:servlet-api:2.4-20040521">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/servletapi/servlet-api/2.4-20040521/d66b0e9c78a90552042ab6f9f2f0afb1d87a268f/servlet-api-2.4-20040521.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
||||
<component name="org.twodividedbyzero.idea.findbugs">
|
||||
<option name="annotationTypeSettings">
|
||||
<map>
|
||||
|
|
112
build.gradle
112
build.gradle
|
@ -1,17 +1,40 @@
|
|||
plugins {
|
||||
id "com.jfrog.bintray" version "1.5"
|
||||
}
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'idea'
|
||||
apply plugin: 'application'
|
||||
apply plugin: 'maven'
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
import org.apache.tools.ant.taskdefs.condition.Os
|
||||
|
||||
defaultTasks 'deploy'
|
||||
|
||||
version = '1.0'
|
||||
|
||||
def deployDir = 'deploy'
|
||||
def buildProp = 'build'
|
||||
def buildProps = 'buildnumber.properties'
|
||||
def localProps = 'local.properties'
|
||||
def isRelease = 'release' in gradle.startParameter.taskNames
|
||||
def mavenGroupId = 'net.thauvin.erik.httpstatus'
|
||||
|
||||
def getVersion(isIncrement = false)
|
||||
{
|
||||
def propsFile = 'buildnumber.properties'
|
||||
def key = 'build'
|
||||
if (isIncrement)
|
||||
{
|
||||
ant.propertyfile(file: propsFile) {
|
||||
entry(key: key,
|
||||
type: 'int',
|
||||
default: '-1',
|
||||
operation: '+')
|
||||
}
|
||||
}
|
||||
def p = new Properties()
|
||||
file(propsFile).withInputStream { stream -> p.load(stream) }
|
||||
return '1.0.' + p.getProperty(key)
|
||||
}
|
||||
|
||||
version = getVersion();
|
||||
|
||||
mainClassName = 'net.thauvin.erik.httpstatus.Reasons'
|
||||
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
|
||||
|
@ -27,17 +50,74 @@ dependencies {
|
|||
testCompile 'org.testng:testng:+'
|
||||
}
|
||||
|
||||
bintray {
|
||||
def p = new Properties()
|
||||
file(localProps).withInputStream { stream -> p.load(stream) }
|
||||
user = p.getProperty('bintrayUser');
|
||||
key = p.getProperty('bintrayApiKey');
|
||||
publications = ['MyPublication']
|
||||
pkg {
|
||||
repo = 'maven'
|
||||
name = rootProject.name
|
||||
licenses = ['BSD 3-Clause']
|
||||
desc = 'HttpStatus JSP Tag Library'
|
||||
websiteUrl = 'https://github.com/ethauvin/HttpStatus'
|
||||
issueTrackerUrl = 'https://github.com/ethauvin/HttpStatus/issues'
|
||||
vcsUrl = 'https://github.com/ethauvin/HttpStatus.git'
|
||||
labels = ['jsp', 'tag library', 'http', 'status code', 'java']
|
||||
publicDownloadNumbers = true
|
||||
version {
|
||||
name = project.version
|
||||
desc = 'Version ' + project.version
|
||||
vcsTag = project.version
|
||||
gpg {
|
||||
sign = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
MyPublication(MavenPublication) {
|
||||
from components.java
|
||||
artifact sourcesJar
|
||||
artifact javadocJar
|
||||
groupId mavenGroupId
|
||||
artifactId rootProject.name.toLowerCase()
|
||||
version project.version
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task javadocJar(type: Jar, dependsOn: javadoc) {
|
||||
group = 'Build'
|
||||
description = 'Builds an archive of the javadoc docs.'
|
||||
classifier = 'javadoc'
|
||||
from javadoc.destinationDir
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar) {
|
||||
group = 'Build'
|
||||
description = 'Builds an archive of the source code.'
|
||||
classifier = 'sources'
|
||||
from sourceSets.main.allSource
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives javadocJar
|
||||
archives sourcesJar
|
||||
|
||||
}
|
||||
|
||||
javadoc {
|
||||
options.tags = ['created']
|
||||
options.author = true
|
||||
}
|
||||
|
||||
compileJava {
|
||||
doFirst {
|
||||
if (isRelease)
|
||||
{
|
||||
ant.propertyfile(file: buildProps) {
|
||||
entry(key: buildProp,
|
||||
type: 'int',
|
||||
default: '-1',
|
||||
operation: '+')
|
||||
}
|
||||
}
|
||||
project.version = getVersion(isRelease)
|
||||
}
|
||||
//options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
|
||||
}
|
||||
|
@ -45,9 +125,6 @@ compileJava {
|
|||
|
||||
jar {
|
||||
doFirst {
|
||||
def props = new Properties()
|
||||
file(buildProps).withInputStream { stream -> props.load(stream) }
|
||||
project.version = version + '.' + props.get(buildProp)
|
||||
archiveName = archiveName.toLowerCase()
|
||||
}
|
||||
manifest.attributes('Main-Class': mainClassName)
|
||||
|
@ -82,7 +159,8 @@ task deploy(dependsOn: ['build', 'copyToDeploy']) {
|
|||
mustRunAfter clean
|
||||
}
|
||||
|
||||
task release(dependsOn: ['deploy', 'pandoc', 'wrapper']) {
|
||||
|
||||
task release(dependsOn: ['deploy']) {
|
||||
group = "Publishing"
|
||||
description = "Releases new version."
|
||||
isRelease = true
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#Wed, 16 Dec 2015 15:35:34 -0800
|
||||
build=1
|
||||
#Mon, 18 Jan 2016 22:24:22 -0800
|
||||
build=2
|
||||
|
|
|
@ -64,6 +64,8 @@ public final class Utils
|
|||
* @param value The string value.
|
||||
* @param defaultValue The default value.
|
||||
* @param xml The {@link #escapeXml(String) xml} flag.
|
||||
*
|
||||
* @throws IOException f an I/O error occurs.
|
||||
*/
|
||||
public static void outWrite(final Writer out, final String value, final String defaultValue, final boolean xml)
|
||||
throws IOException
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue