| 1 |
plugins { |
| 2 |
id "com.jfrog.bintray" version "1.8.1" |
| 3 |
} |
| 4 |
apply plugin : 'maven-publish' |
| 5 |
|
| 6 |
apply plugin: 'java' |
| 7 |
|
| 8 |
group = 'net.osdn.blogs.flexmark.ext' |
| 9 |
archivesBaseName = 'flexmark-ext-inline-tags' |
| 10 |
version = '0.1.5' |
| 11 |
|
| 12 |
tasks.withType(JavaCompile) { |
| 13 |
sourceCompatibility = 1.7 |
| 14 |
targetCompatibility = 1.7 |
| 15 |
} |
| 16 |
|
| 17 |
def defaultEncoding = 'UTF-8' |
| 18 |
tasks.withType(AbstractCompile).each { it.options.encoding = defaultEncoding } |
| 19 |
tasks.withType(GroovyCompile).each { it.groovyOptions.encoding = defaultEncoding } |
| 20 |
|
| 21 |
javadoc { |
| 22 |
options.charSet = defaultEncoding |
| 23 |
options.encoding = defaultEncoding |
| 24 |
options.memberLevel = JavadocMemberLevel.PUBLIC |
| 25 |
options.stylesheetFile = new File(rootDir, 'javadoc.css') |
| 26 |
} |
| 27 |
|
| 28 |
repositories { |
| 29 |
jcenter() |
| 30 |
} |
| 31 |
|
| 32 |
dependencies { |
| 33 |
compile 'com.vladsch.flexmark:flexmark:0.50.48' |
| 34 |
} |
| 35 |
|
| 36 |
defaultTasks 'clean', 'build' |
| 37 |
|
| 38 |
task sourcesJar(type: Jar, dependsOn: classes) { |
| 39 |
setGroup('build') |
| 40 |
setDescription('Assembles a jar archive containing the main source code.') |
| 41 |
archiveClassifier = 'sources' |
| 42 |
from sourceSets.main.allSource |
| 43 |
} |
| 44 |
|
| 45 |
task javadocJar(type: Jar, dependsOn: javadoc) { |
| 46 |
setGroup('documentation') |
| 47 |
setDescription('Generates Javadoc API documentation as a jar archive.') |
| 48 |
archiveClassifier = 'javadoc' |
| 49 |
from javadoc.destinationDir |
| 50 |
} |
| 51 |
|
| 52 |
// For Bintray maven repository |
| 53 |
// Use publishing -> bintrayUpload task. |
| 54 |
|
| 55 |
artifacts { |
| 56 |
archives sourcesJar |
| 57 |
archives javadocJar |
| 58 |
} |
| 59 |
|
| 60 |
publishing { |
| 61 |
publications { |
| 62 |
mavenJava(MavenPublication) { |
| 63 |
from components.java |
| 64 |
artifact sourcesJar |
| 65 |
artifact javadocJar |
| 66 |
} |
| 67 |
} |
| 68 |
} |
| 69 |
bintray { |
| 70 |
user = System.getenv('BINTRAY_USER') |
| 71 |
key = System.getenv('BINTRAY_KEY') |
| 72 |
|
| 73 |
publications = ['mavenJava'] |
| 74 |
|
| 75 |
pkg { |
| 76 |
repo = 'maven' |
| 77 |
name = 'flexmark-ext-inline-tags' |
| 78 |
licenses = ['BSD 2-Clause'] |
| 79 |
vcsUrl = 'https://svn.osdn.net/svnroot/blogs/flexmark-ext-inline-tags' |
| 80 |
} |
| 81 |
} |