-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add task to aggregate subprojects scaladocs
- Loading branch information
1 parent
eb50e37
commit 91fbcd4
Showing
8 changed files
with
95 additions
and
0 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
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
17 changes: 17 additions & 0 deletions
17
src/test/resources/io/github/tassiluca/scalaextras/aggregated-scaladoc/build.gradle.kts
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,17 @@ | ||
plugins { | ||
scala | ||
id("io.github.tassiluca.gradle-scala-extras") | ||
} | ||
|
||
allprojects { | ||
apply(plugin = "scala") | ||
apply(plugin = "io.github.tassiluca.gradle-scala-extras") | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation("org.scala-lang:scala3-library_3:3.6.1") | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
...ca/scalaextras/aggregated-scaladoc/core/src/main/scala/io.github.tassiluca/Launcher.scala
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,6 @@ | ||
package io.github.tassiluca | ||
|
||
/** A simple object that prints "Hello, world!" to the console. */ | ||
object Launcher: | ||
def main(args: Array[String]): Unit = | ||
println("Hello, world!") |
4 changes: 4 additions & 0 deletions
4
src/test/resources/io/github/tassiluca/scalaextras/aggregated-scaladoc/settings.gradle.kts
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,4 @@ | ||
include( | ||
"core", | ||
"utils", | ||
) |
20 changes: 20 additions & 0 deletions
20
src/test/resources/io/github/tassiluca/scalaextras/aggregated-scaladoc/test.yaml
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,20 @@ | ||
tests: | ||
- description: "Properly formatted sources" | ||
configuration: | ||
tasks: | ||
- clean | ||
- check | ||
- aggregateScaladoc | ||
options: | ||
- --stacktrace | ||
- --info | ||
expectation: | ||
result: success | ||
outcomes: | ||
success: | ||
- check | ||
- aggregateScaladoc | ||
files: | ||
existing: | ||
- name: "build/docs/aggregated-scaladoc/io/github/tassiluca/Launcher$.html" | ||
- name: "build/docs/aggregated-scaladoc/io/github/tassiluca/Square.html" |
15 changes: 15 additions & 0 deletions
15
...uca/scalaextras/aggregated-scaladoc/utils/src/main/scala/io.github.tassiluca/Square.scala
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,15 @@ | ||
package io.github.tassiluca | ||
|
||
/** A square class that takes a side and calculates the area and perimeter | ||
* @param side the side of the square | ||
*/ | ||
case class Square(side: Double): | ||
/** Calculates the area of the square | ||
* @return the area of the square | ||
*/ | ||
def area: Double = side * side | ||
|
||
/** Calculates the perimeter of the square | ||
* @return the perimeter of the square | ||
*/ | ||
def perimeter: Double = 4 * side |