You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ct...@apache.org on 2019/09/24 21:24:25 UTC
[lucene-solr] 01/01: Add build.gradle for the Ref Guide (WIP)
This is an automated email from the ASF dual-hosted git repository.
ctargett pushed a commit to branch jira/SOLR-13452_gradle_7_refguide
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
commit 2ba11280511b38506e40689c430917cd4f4d81ac
Author: Cassandra Targett <ca...@lucidworks.com>
AuthorDate: Tue Sep 24 16:23:45 2019 -0500
Add build.gradle for the Ref Guide (WIP)
---
solr/solr-ref-guide/build.gradle | 86 +++++++++++++++++++++++++++++++++++-----
1 file changed, 76 insertions(+), 10 deletions(-)
diff --git a/solr/solr-ref-guide/build.gradle b/solr/solr-ref-guide/build.gradle
index e95df97..f1aff29 100644
--- a/solr/solr-ref-guide/build.gradle
+++ b/solr/solr-ref-guide/build.gradle
@@ -15,18 +15,37 @@
* limitations under the License.
*/
+
+// Using 1.x versions of asciidoctor-gradle since 2.x wouldn't work
+ plugins {
+ id 'org.asciidoctor.convert' version '1.6.1'
+ id 'com.github.jruby-gradle.base' version '1.4.0'
+ }
+
+ repositories {
+ maven { url 'http://rubygems-proxy.torquebox.org/releases' }
+ }
+
+ dependencies {
+ gems 'rubygems:jekyll:3.5.2'
+ gems 'rubygems:jekyll-asciidoc:2.1.0'
+ gems 'rubygems:slim:3.0.9'
+ }
+
apply plugin: 'java'
+ apply plugin: 'com.github.jruby-gradle.base'
+ import com.github.jrubygradle.JRubyExec
configurations {
tools
refGuide
}
-
+
dependencies {
tools gradleApi()
tools localGroovy()
-
- tools ('org.asciidoctor:asciidoctor-ant')
+
+// tools ('org.asciidoctor:asciidoctor-ant')
tools ('com.vaadin.external.google:android-json')
tools ('org.jsoup:jsoup')
tools ('org.apache.pdfbox:pdfbox')
@@ -38,21 +57,68 @@
tools ('com.google.guava:guava')
tools ('commons-codec:commons-codec')
}
-
-
+
sourceSets {
tools {
compileClasspath += sourceSets.main.runtimeClasspath += configurations.tools
runtimeClasspath += sourceSets.main.runtimeClasspath
}
-
+
tools.java.srcDirs = ['tools']
refGuide.java.srcDirs = ['src']
}
-
+
forbiddenApisTools {
bundledSignatures -= 'jdk-system-out'
}
-
-
-
\ No newline at end of file
+
+// Copies the files to build/solr-ref-guide
+task refguide-init(type: Copy) {
+
+}
+
+task refguide-jars(type: JavaCompile){
+
+}
+
+// Define the asciidoctorj version
+asciidoctorj {
+ version = '1.5.0-beta.5'
+}
+
+
+// general Asciidoc params for HTML conversion - barebones if still needed?
+asciidoctor {
+ doFirst {
+ println ("Starting Ref Guide build")
+ }
+ doLast {
+ println ("Finished Ref Guide build")
+ }
+ logDocuments = true
+ outputs.upToDateWhen { false }
+
+ backends 'html5'
+ sourceDir file('src/')
+ outputDir file('../build/solr-ref-guide/')
+ options doctype: 'book'
+
+ attributes \
+ 'safemode': 'unsafe',
+ 'source-highlighter': 'coderay',
+ 'figure-caption!': '',
+ 'idprefix': '',
+ 'idseparator': '-',
+ 'icons': 'font',
+ 'icon-set': 'fa',
+ 'section-toc': ''
+}
+
+// Jekyll for HTML conversion - doesn't work yet
+task jekyll(type: JRubyExec) {
+ dependsOn jrubyPrepare
+
+ script 'jekyll'
+ workingDir = file('src/')
+ scriptArgs 'build', workingDir
+}