Skip to content

Commit

Permalink
Merge pull request #1450 from SpineEventEngine/add-dokka-documentatio…
Browse files Browse the repository at this point in the history
…n-to-artifacts

Add Dokka documentation to artifacts
  • Loading branch information
tripolkaandrey authored Apr 27, 2022
2 parents b619573 + bee545e commit a8a75b5
Show file tree
Hide file tree
Showing 45 changed files with 1,691 additions and 3,292 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-on-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

- name: Build project and run tests
shell: bash
run: ./gradlew build --stacktrace
run: ./gradlew build "-Dorg.gradle.jvmargs=-XX:MaxMetaspaceSize=512m"

# See: https://github.com/marketplace/actions/junit-report-action
- name: Publish Test Report
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-on-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Build project and run tests
shell: cmd
# For the reason on `--no-daemon` see https://github.com/actions/cache/issues/454
run: gradlew.bat build --stacktrace --no-daemon
run: gradlew.bat build --stacktrace --no-daemon "-Dorg.gradle.jvmargs=-XX:MaxMetaspaceSize=512m"

# See: https://github.com/marketplace/actions/junit-report-action
- name: Publish Test Report
Expand Down
7 changes: 6 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 20 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ import io.spine.internal.gradle.publish.spinePublishing
import io.spine.internal.gradle.report.coverage.JacocoConfig
import io.spine.internal.gradle.report.license.LicenseReporter
import io.spine.internal.gradle.report.pom.PomGenerator
import io.spine.internal.gradle.test.configureLogging
import io.spine.internal.gradle.test.registerTestTasks
import io.spine.internal.gradle.testing.configureLogging
import io.spine.internal.gradle.testing.registerTestTasks
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

buildscript {
Expand Down Expand Up @@ -102,16 +102,22 @@ spinePublishing {
"model-assembler",
"model-verifier",
)

destinations = with(PublishingRepos) {
setOf(
cloudRepo,
gitHub("core-java"),
cloudArtifactRegistry
)
}

testJar {
inclusions = setOf("server")
}

dokkaJar {
enabled = true
}
}

allprojects {
Expand Down Expand Up @@ -143,6 +149,7 @@ subprojects {
plugin("pmd")
plugin("maven-publish")
plugin("pmd-settings")
plugin("dokka-for-java")
}

java {
Expand Down Expand Up @@ -176,6 +183,10 @@ subprojects {
testImplementation("io.spine.tools:spine-testlib:$spineBaseVersion")
}

/**
* Force Error Prone dependencies to `2.10.0`, because in `2.11.0` the empty constructor in
* [com.google.errorprone.bugpatterns.CheckReturnValue] was removed leading to breaking the API.
*/
configurations {
forceVersions()
excludeProtobufLite()
Expand All @@ -186,7 +197,13 @@ subprojects {
"io.spine:spine-base:$spineBaseVersion",
"io.spine:spine-time:$spineTimeVersion",
"io.spine.tools:spine-testlib:$spineBaseVersion",
"io.spine.tools:spine-plugin-base:$toolBaseVersion"
"io.spine.tools:spine-plugin-base:$toolBaseVersion",
"com.google.errorprone:error_prone_core:2.10.0",
"com.google.errorprone:error_prone_annotations:2.10.0",
"com.google.errorprone:error_prone_annotation:2.10.0",
"com.google.errorprone:error_prone_check_api:2.10.0",
"com.google.errorprone:error_prone_test_helpers:2.10.0",
"com.google.errorprone:error_prone_type_annotations:2.10.0"
)
}
}
Expand Down
47 changes: 44 additions & 3 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ val grGitVersion = "3.1.1"
* Please check that this value matches one defined in
* [io.spine.internal.dependency.Kotlin.version].
*/
val kotlinVersion = "1.6.10"
val kotlinVersion = "1.6.21"

/**
* The version of Guava used in `buildSrc`.
*
* Always use the same version as the one specified in [io.spine.internal.dependency.Guava].
* Otherwise, when testing Gradle plugins, clashes may occur.
*/
val guavaVersion = "31.0.1-jre"
val guavaVersion = "31.1-jre"

/**
* The version of ErrorProne Gradle plugin.
Expand All @@ -93,6 +93,41 @@ val errorProneVersion = "2.0.2"
*/
val protobufPluginVersion = "0.8.18"

/**
* The version of Dokka Gradle Plugins.
*
* Please keep in sync with [io.spine.internal.dependency.Dokka.version].
*
* @see <a href="https://github.com/Kotlin/dokka/releases">
* Dokka Releases</a>
*/
val dokkaVersion = "1.6.20"

configurations.all {
resolutionStrategy {
// Force Kotlin lib versions avoiding using those bundled with Gradle.
force(
"org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion",
"org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion",
"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion",
"org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion",
"org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"
)
}
}

val jvmVersion = JavaLanguageVersion.of(11)

java {
toolchain.languageVersion.set(jvmVersion)
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = jvmVersion.toString()
}
}

dependencies {
implementation("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jacksonVersion")
Expand All @@ -103,6 +138,12 @@ dependencies {
api("com.github.jk1:gradle-license-report:$licenseReportVersion")
implementation("org.ajoberstar.grgit:grgit-core:${grGitVersion}")
implementation("net.ltgt.gradle:gradle-errorprone-plugin:${errorProneVersion}")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")

// Add explicit dependency to avoid warning on different Kotlin runtime versions.
implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")

implementation("gradle.plugin.com.google.protobuf:protobuf-gradle-plugin:$protobufPluginVersion")
implementation("org.jetbrains.dokka:dokka-gradle-plugin:${dokkaVersion}")
implementation("org.jetbrains.dokka:dokka-base:${dokkaVersion}")
}
68 changes: 0 additions & 68 deletions buildSrc/src/main/groovy/dart/build-tasks.gradle

This file was deleted.

79 changes: 0 additions & 79 deletions buildSrc/src/main/groovy/dart/pub-publish-tasks.gradle

This file was deleted.

Loading

0 comments on commit a8a75b5

Please sign in to comment.