-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#318 WIP Use common directory for all integration tests
and improve clean tasks (align with Gradle good practices)
- Loading branch information
Showing
7 changed files
with
168 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
plugins { | ||
id 'org.asciidoctor.jvm.convert' version '4.0.3' | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
def projectRoot = "../.." | ||
task copyReadmeResources(type: Copy) { | ||
group 'Verification' | ||
description 'Copy resources of READMEs for integration test' | ||
|
||
from projectRoot | ||
include '*.properties' | ||
into "${Project.DEFAULT_BUILD_DIR_NAME}/docs" | ||
doLast { | ||
String linkPath = "${Project.DEFAULT_BUILD_DIR_NAME}/docs/images" | ||
java.nio.file.Path target = java.nio.file.Paths.get("../../../../src/docs/images") | ||
File linkFile = file(linkPath) | ||
java.nio.file.Path link = linkFile.toPath() | ||
logger.quiet("Creating symlink from '{}' to '{}'", target, link) | ||
if (linkFile.exists()) { | ||
linkFile.delete() | ||
} | ||
java.nio.file.Files.createSymbolicLink(link, target) | ||
} | ||
} | ||
|
||
task buildReadmeRoot(type: org.asciidoctor.gradle.jvm.AsciidoctorTask) { | ||
group 'Verification' | ||
description 'Convert root README for integration test' | ||
|
||
sourceDir projectRoot | ||
sources { | ||
include 'README.adoc' | ||
} | ||
baseDirFollowsSourceFile() | ||
outputDir file("${Project.DEFAULT_BUILD_DIR_NAME}/docs") | ||
attributes ( | ||
"imagesdir": "images" | ||
) | ||
} | ||
buildReadmeRoot.dependsOn(copyReadmeResources) | ||
|
||
task buildReadmeGradlePlugin(type: org.asciidoctor.gradle.jvm.AsciidoctorTask) { | ||
group 'Verification' | ||
description 'Convert Gradle Plugin README for integration test' | ||
|
||
sourceDir projectRoot | ||
sources { | ||
include 'htmlSanityCheck-gradle-plugin/README.adoc' | ||
} | ||
baseDirFollowsSourceFile() | ||
outputDir file("${Project.DEFAULT_BUILD_DIR_NAME}/docs") | ||
attributes ( | ||
"imagesdir": "../images" | ||
) | ||
} | ||
buildReadmeGradlePlugin.dependsOn(buildReadmeRoot) | ||
|
||
task buildReadmeAll() { | ||
group 'Verification' | ||
description 'Convert all READMEs for integration test' | ||
} | ||
buildReadmeAll.dependsOn(buildReadmeRoot, buildReadmeGradlePlugin) | ||
build.dependsOn(buildReadmeAll) | ||
|
||
/* | ||
* Copyright Gerd Aschemann and aim42 contributors. | ||
* | ||
* 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 | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
* | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
rootProject.name = 'hsc-integration-test-common' | ||
|
||
/* | ||
* Copyright Gerd Aschemann and aim42 contributors. | ||
* | ||
* 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 | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
* | ||
*/ |
Empty file.
4 changes: 0 additions & 4 deletions
4
integration-test/common/src/test/resources/integration-test.adoc
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters