This repository has been archived by the owner on Nov 17, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
73 lines (60 loc) · 2.05 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import org.asciidoctor.gradle.jvm.AsciidoctorTask
import com.neo4j.gradle.wordpress.WordPressUploadTask
plugins {
id 'org.asciidoctor.jvm.gems' version '3.2.0' apply false
id 'org.asciidoctor.jvm.convert' version '3.2.0' apply false
id "com.neo4j.gradle.wordpress.WordPressPlugin" version "0.2.0"
}
apply plugin: 'org.asciidoctor.jvm.gems'
repositories {
mavenCentral()
jcenter()
ruby {
gems()
}
}
dependencies {
asciidoctorGems 'rubygems:neo4j-asciidoctor-extensions:0.1.1'
}
wordpress {
username = project.hasProperty('wordpress-username') ? project.property('wordpress-username') : 'neo'
password = project.hasProperty('wordpress-password') ? project.property('wordpress-password') : ''
host = project.hasProperty('wordpress-host') ? project.property('wordpress-host') : 'localhost'
scheme = 'https'
}
def stage = project.findProperty('stage')
group = 'com.neo4j'
version = '1.0.0'
archivesBaseName = 'neo4j-labs-pages'
description = """neo4j-labs-pages"""
asciidoctorj {
requires "${rootProject.projectDir}/resources/extensions.rb"
options standalone: false,
template_dirs: ["${rootProject.projectDir}/resources/templates"]
attributes 'apoc-version': "3.5.0.4",
'icons': 'font',
'stage': stage != null ? stage : '',
'parent-path': '/labs',
'document-metadata-attrs-include': 'slug,parent-path,excerpt,featured-media,tags*'
}
task convertHtml(type: AsciidoctorTask) {
dependsOn asciidoctorGemsPrepare
baseDir file("${projectDir}/asciidoc")
sourceDir file("${projectDir}/asciidoc")
sources {
exclude 'footer.adoc'
}
outputDir file("${projectDir}/build/html")
}
task convert {
dependsOn convertHtml
}
if (stage == 'production' || stage == 'testing') {
task wordPressUpload(type: WordPressUploadTask) {
dependsOn convertHtml
source = convertHtml.outputs.files
type = "page"
status = stage == 'production' ? "publish" : "private"
template = "page-inner-100-blue.php"
}
}