|
plugins { |
|
|
id "com.jfrog.bintray" version "1.8.5" |
|
|
} |
|
|
apply plugin : 'maven-publish' |
|
|
|
|
| 1 |
apply plugin: 'java' |
apply plugin: 'java' |
| 2 |
|
|
| 3 |
group = 'net.osdn.blogs.flexmark.ext' |
group = 'net.osdn.blogs.flexmark.ext' |
| 4 |
archivesBaseName = 'flexmark-ext-inline-tags' |
archivesBaseName = 'flexmark-ext-inline-tags' |
| 5 |
version = '0.3.1' |
version = '0.3.2' |
| 6 |
|
|
| 7 |
tasks.withType(JavaCompile) { |
tasks.withType(JavaCompile) { |
| 8 |
sourceCompatibility = 1.7 |
sourceCompatibility = 1.8 |
| 9 |
targetCompatibility = 1.7 |
targetCompatibility = 1.8 |
| 10 |
options.compilerArgs << '-Xlint:all' |
options.compilerArgs << '-Xlint:all' |
| 11 |
} |
} |
| 12 |
|
|
| 14 |
tasks.withType(AbstractCompile).each { it.options.encoding = defaultEncoding } |
tasks.withType(AbstractCompile).each { it.options.encoding = defaultEncoding } |
| 15 |
tasks.withType(GroovyCompile).each { it.groovyOptions.encoding = defaultEncoding } |
tasks.withType(GroovyCompile).each { it.groovyOptions.encoding = defaultEncoding } |
| 16 |
|
|
|
javadoc { |
|
|
options.charSet = defaultEncoding |
|
|
options.encoding = defaultEncoding |
|
|
options.memberLevel = JavadocMemberLevel.PUBLIC |
|
|
options.stylesheetFile = new File(rootDir, 'javadoc.css') |
|
|
} |
|
|
|
|
| 17 |
repositories { |
repositories { |
| 18 |
jcenter() |
mavenCentral() |
| 19 |
} |
} |
| 20 |
|
|
| 21 |
dependencies { |
dependencies { |
| 24 |
|
|
| 25 |
defaultTasks 'clean', 'build' |
defaultTasks 'clean', 'build' |
| 26 |
|
|
| 27 |
|
javadoc { |
| 28 |
|
options.charSet = defaultEncoding |
| 29 |
|
options.encoding = defaultEncoding |
| 30 |
|
options.memberLevel = JavadocMemberLevel.PUBLIC |
| 31 |
|
options.stylesheetFile = new File(rootDir, 'javadoc.css') |
| 32 |
|
} |
| 33 |
|
|
| 34 |
task sourcesJar(type: Jar, dependsOn: classes) { |
task sourcesJar(type: Jar, dependsOn: classes) { |
| 35 |
setGroup('build') |
setGroup('build') |
| 36 |
setDescription('Assembles a jar archive containing the main source code.') |
setDescription('Assembles a jar archive containing the main source code.') |
| 37 |
archiveClassifier = 'sources' |
archiveClassifier.set("sources") |
| 38 |
from sourceSets.main.allSource |
from sourceSets.main.allSource |
| 39 |
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE |
| 40 |
} |
} |
| 41 |
|
|
| 42 |
task javadocJar(type: Jar, dependsOn: javadoc) { |
task javadocJar(type: Jar, dependsOn: javadoc) { |
| 43 |
setGroup('documentation') |
setGroup('documentation') |
| 44 |
setDescription('Generates Javadoc API documentation as a jar archive.') |
setDescription('Generates Javadoc API documentation as a jar archive.') |
| 45 |
archiveClassifier = 'javadoc' |
archiveClassifier.set("javadoc") |
| 46 |
from javadoc.destinationDir |
from javadoc.destinationDir |
| 47 |
} |
} |
|
|
|
|
// For Bintray maven repository |
|
|
// Use publishing -> bintrayUpload task. |
|
|
|
|
|
artifacts { |
|
|
archives sourcesJar |
|
|
archives javadocJar |
|
|
} |
|
|
|
|
|
publishing { |
|
|
publications { |
|
|
mavenJava(MavenPublication) { |
|
|
from components.java |
|
|
artifact sourcesJar |
|
|
artifact javadocJar |
|
|
} |
|
|
} |
|
|
} |
|
|
bintray { |
|
|
user = System.getenv('BINTRAY_USER') |
|
|
key = System.getenv('BINTRAY_KEY') |
|
|
|
|
|
publications = ['mavenJava'] |
|
|
|
|
|
pkg { |
|
|
repo = 'maven' |
|
|
name = 'flexmark-ext-inline-tags' |
|
|
licenses = ['BSD 2-Clause'] |
|
|
vcsUrl = 'https://svn.osdn.net/svnroot/blogs/flexmark-ext-inline-tags' |
|
|
} |
|
|
} |
|