Skip to content
Permalink
master
Go to file
 
 
Cannot retrieve contributors at this time
84 lines (69 sloc) 2.45 KB
/*
******************************************************************************
* Copyright 2018-2020 Coventry University Higher Education Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************
*/
///////////////////////////////////////////////////////////////////////////////
// Gradle build configuration for the root project.
///////////////////////////////////////////////////////////////////////////////
/////////////////// Imports
import org.ajoberstar.grgit.Grgit
import org.apache.tools.ant.taskdefs.condition.Os
import uk.ac.coventry.gradle.Project
import uk.ac.coventry.gradle.Version
/////////////////// Plugins
buildscript {
repositories {
jcenter()
}
}
plugins {
id("org.ajoberstar.grgit") version "${grgitPlugin}"
}
/////////////////// Properties
description = "Architecture Root Project"
/////////////////// Wrapper
wrapper {
gradleVersion = "6.6.1"
}
/////////////////// Configuration
// Build configuration for all projects, including root
allprojects { proj ->
repositories {
mavenLocal()
jcenter()
}
/* Project configuration */
Project projMeta = Project.newInstance(proj.name).orElseThrow { new IllegalArgumentException("Unknown project: [${proj.name}]") }
proj.with {
group = projMeta.group()
version = projMeta.version()
}
}
/////////////////// Tasks
// Antora build for the web site
task antoraBuild(type:Exec) {
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
executable = "cmd"
args = ["/c", "docker"]
} else {
executable = "docker"
}
args("run")
args("--volume=${rootDir}:/antora:Z", "--rm", "--tty")
args("-e", "DOCSEARCH_ENABLED=true", "-e", "DOCSEARCH_ENGINE=lunr")
args("${dockerAntoraTag}", "--generator", "antora-site-generator-lunr", "antora-playbook.yml")
}
antoraBuild.dependsOn ":" + Project.DOCKER_ANTORA_CUSTOM.project + ":dockerBuild"
You can’t perform that action at this time.