Skip to content

Commit cad7c66

Browse files
Add test project
1 parent 39163c8 commit cad7c66

File tree

6 files changed

+70
-14
lines changed

6 files changed

+70
-14
lines changed

build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ subprojects {
3838
apply plugin: "java-library"
3939

4040
java {
41-
sourceCompatibility = JavaVersion.VERSION_17
42-
targetCompatibility = JavaVersion.VERSION_17
41+
toolchain {
42+
languageVersion = JavaLanguageVersion.of(17)
43+
}
4344
}
4445

4546
repositories {

settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ pluginManagement {
2323

2424
rootProject.name = "smithy-docgen"
2525
include(":smithy-docgen-core")
26+
include(":smithy-docgen-test")

smithy-docgen-core/build.gradle

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
11
/*
2-
* Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License").
5-
* You may not use this file except in compliance with the License.
6-
* A copy of the License is located at
7-
*
8-
* http://aws.amazon.com/apache2.0
9-
*
10-
* or in the "license" file accompanying this file. This file is distributed
11-
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12-
* express or implied. See the License for the specific language governing
13-
* permissions and limitations under the License.
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0
144
*/
155

166
description = "This module contains support for generating API documentation " +

smithy-docgen-test/build.gradle

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
buildscript {
7+
repositories {
8+
mavenCentral()
9+
}
10+
dependencies {
11+
"classpath"("software.amazon.smithy:smithy-cli:$smithyVersion")
12+
}
13+
}
14+
15+
plugins {
16+
id "software.amazon.smithy.gradle.smithy-base" version "$smithyGradleVersion"
17+
}
18+
19+
tasks["jar"].enabled = false
20+
21+
ext {
22+
displayName = "Smithy :: DocGen :: Test"
23+
moduleName = "software.amazon.smithy.docgen.test"
24+
}
25+
26+
repositories {
27+
mavenLocal()
28+
mavenCentral()
29+
}
30+
31+
dependencies {
32+
implementation(project(":smithy-docgen-core"))
33+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
$version: "2.0"
2+
3+
namespace com.example
4+
5+
/// This service is not intended to be representative of a real service. Rather, it is
6+
/// meant to exercise different kinds of behavior that the documentation generator
7+
/// should handle. For example, the implementation <b>must</b> be able to handle HTML
8+
/// tags since that's part of the [CommonMark spec](https://spec.commonmark.org/).
9+
@title("Documented Service")
10+
service DocumentedService {version: "2023-10-13"}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"version": "1.0",
3+
"projections": {
4+
"plain-markdown": {
5+
"plugins": {
6+
"docgen": {
7+
"service": "com.example#DocumentedService",
8+
"format": "markdown"
9+
}
10+
}
11+
},
12+
"sphinx-markdown": {
13+
"plugins": {
14+
"docgen": {
15+
"service": "com.example#DocumentedService",
16+
"format": "sphinx-markdown"
17+
}
18+
}
19+
}
20+
}
21+
}

0 commit comments

Comments
 (0)