| 1 |
apply plugin: 'java' |
| 2 |
|
| 3 |
group = 'net.osdn.blogs.flexmark.ext' |
| 4 |
archivesBaseName = 'flexmark-ext-inline-tags' |
| 5 |
version = '0.3.2' |
| 6 |
|
| 7 |
tasks.withType(JavaCompile) { |
| 8 |
sourceCompatibility = 1.8 |
| 9 |
targetCompatibility = 1.8 |
| 10 |
options.compilerArgs << '-Xlint:all' |
| 11 |
} |
| 12 |
|
| 13 |
def defaultEncoding = 'UTF-8' |
| 14 |
tasks.withType(AbstractCompile).each { it.options.encoding = defaultEncoding } |
| 15 |
tasks.withType(GroovyCompile).each { it.groovyOptions.encoding = defaultEncoding } |
| 16 |
|
| 17 |
repositories { |
| 18 |
mavenCentral() |
| 19 |
} |
| 20 |
|
| 21 |
dependencies { |
| 22 |
implementation 'com.vladsch.flexmark:flexmark:0.62.2' |
| 23 |
} |
| 24 |
|
| 25 |
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) { |
| 35 |
setGroup('build') |
| 36 |
setDescription('Assembles a jar archive containing the main source code.') |
| 37 |
archiveClassifier.set("sources") |
| 38 |
from sourceSets.main.allSource |
| 39 |
duplicatesStrategy = DuplicatesStrategy.EXCLUDE |
| 40 |
} |
| 41 |
|
| 42 |
task javadocJar(type: Jar, dependsOn: javadoc) { |
| 43 |
setGroup('documentation') |
| 44 |
setDescription('Generates Javadoc API documentation as a jar archive.') |
| 45 |
archiveClassifier.set("javadoc") |
| 46 |
from javadoc.destinationDir |
| 47 |
} |