Skip to content

Commit

Permalink
Fix build failures caused by antora changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatan-ivanov committed Sep 14, 2023
1 parent c3ba206 commit 5ce33ad
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 68 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: docs-build
fetch-depth: 1
Expand Down
19 changes: 5 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@ buildscript {

// TODO: remove this hack, see: https://github.com/nebula-plugins/nebula-release-plugin/issues/213
def releaseStage = findProperty('release.stage')
if (!project.hasProperty("antora")) {
apply plugin: 'nebula.release'
release.defaultVersionStrategy = nebula.plugin.release.git.opinion.Strategies.SNAPSHOT
}
apply plugin: 'nebula.release'
release.defaultVersionStrategy = nebula.plugin.release.git.opinion.Strategies.SNAPSHOT

apply plugin: 'io.github.gradle-nexus.publish-plugin'
apply from: 'dependencies.gradle'
Expand All @@ -60,10 +58,6 @@ subprojects {
apply plugin: 'io.spring.javaformat'
apply plugin: 'me.champeau.jmh'

nohttp {
source.exclude "**/build/**"
}

java {
// It is more idiomatic to define different features for different sets of optional
// dependencies, e.g., 'dropwizard' and 'reactor'. If this library published Gradle
Expand Down Expand Up @@ -290,10 +284,8 @@ subprojects {
apply plugin: 'com.netflix.nebula.maven-apache-license'
apply plugin: 'com.netflix.nebula.publish-verification'
apply plugin: 'com.netflix.nebula.contacts'
if (!project.hasProperty("antora")) {
apply plugin: 'com.netflix.nebula.info'
apply plugin: 'com.netflix.nebula.project'
}
apply plugin: 'com.netflix.nebula.info'
apply plugin: 'com.netflix.nebula.project'

if (project.name != 'micrometer-tracing-bom') {
jar {
Expand Down Expand Up @@ -336,8 +328,7 @@ subprojects {
}

def check = tasks.findByName('check')
boolean antora = project.hasProperty("antora")
if (check && !antora) project.rootProject.tasks.releaseCheck.dependsOn check
if (check) project.rootProject.tasks.releaseCheck.dependsOn check
}

nexusPublishing {
Expand Down
3 changes: 0 additions & 3 deletions config/checkstyle/checkstyle-suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,5 @@
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
"https://checkstyle.org/dtds/suppressions_1_2.dtd">
<suppressions>
<suppress files=".*Slf4j.*" checks="SLF4JIllegalImportCheck"/>

<suppress id="sysout" files="[\\/]samples[\\/].*"/>
<suppress id="sysout" files="[\\/]src[\\/]test[\\/].*"/>
</suppressions>
2 changes: 1 addition & 1 deletion docs/antora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ nav:
ext:
collector:
run:
command: gradlew -q -PbuildSrc.skipTests=true -Pantora "-Dorg.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError" :docs:generateAntoraResources
command: ./gradlew -q -PbuildSrc.skipTests=true "-Dorg.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError" :docs:generateAntoraResources
local: true
scan:
dir: ./build/generated-antora-resources
Expand Down
107 changes: 61 additions & 46 deletions docs/build.gradle
Original file line number Diff line number Diff line change
@@ -1,75 +1,90 @@
plugins {
id 'java'
id 'io.spring.antora.generate-antora-yml' version '0.0.1'
id 'org.antora' version '1.0.0'
id 'java-library'
buildscript {
dependencyLocking {
lockAllConfigurations()
}

repositories {
mavenCentral()
gradlePluginPortal()
}

dependencies {
classpath 'io.spring.gradle.antora:spring-antora-plugin:0.0.1'
classpath 'org.antora:gradle-antora-plugin:1.0.0'
}
}

description = "Micrometer Tracing Docs"
apply plugin: 'java'
apply plugin: 'io.spring.antora.generate-antora-yml'
apply plugin: 'org.antora'

description = 'Micrometer Tracing Docs'

repositories {
mavenCentral()
}

dependencies {
implementation project(':micrometer-tracing')
implementation 'ch.qos.logback:logback-classic'
implementation 'org.slf4j:slf4j-api'

testImplementation 'io.zipkin.reporter2:zipkin-sender-urlconnection'

testImplementation project(':micrometer-tracing-test')
testImplementation project(':micrometer-tracing-integration-test')
testImplementation 'org.aspectj:aspectjweaver'
testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation 'org.mockito:mockito-inline'
testImplementation 'org.assertj:assertj-core'
testImplementation 'org.springframework:spring-context'
}

antora {
version = '3.2.0-alpha.2'
playbook = 'antora-playbook.yml'
options = ['--clean', '--stacktrace']
environment = [
'ALGOLIA_API_KEY': 'da671ceec1f84f80f280884a6a91bde5',
'ALGOLIA_APP_ID': 'WB1FQYI187',
'ALGOLIA_INDEX_NAME': 'micrometer'
'ALGOLIA_API_KEY': 'da671ceec1f84f80f280884a6a91bde5',
'ALGOLIA_APP_ID': 'WB1FQYI187',
'ALGOLIA_INDEX_NAME': 'micrometer'
]

dependencies = [
'@antora/atlas-extension': '1.0.0-alpha.1',
'@antora/collector-extension': '1.0.0-alpha.3',
'@asciidoctor/tabs': '1.0.0-beta.3',
'@springio/antora-extensions': '1.4.2',
'@springio/asciidoctor-extensions': '1.0.0-alpha.8',
'@antora/atlas-extension': '1.0.0-alpha.1',
'@antora/collector-extension': '1.0.0-alpha.3',
'@asciidoctor/tabs': '1.0.0-beta.3',
'@springio/antora-extensions': '1.4.2',
'@springio/asciidoctor-extensions': '1.0.0-alpha.8',
]
}


tasks.named("generateAntoraYml") {
asciidocAttributes = project.provider( {
return ["micrometer-tracing-version": project.version.toString()]
} )
tasks.named('generateAntoraYml') {
asciidocAttributes = project.provider {
return ['micrometer-tracing-version': project.version.toString()]
}
}

tasks.create("generateAntoraResources") {
dependsOn 'generateAntoraYml'
tasks.create('generateAntoraResources') {
dependsOn 'generateAntoraYml'
}

tasks.named("antora") {
dependsOn "generateAntoraResources"
tasks.named('antora') {
dependsOn 'generateAntoraResources', 'test'
}

tasks.named("antora") {
dependsOn "test"
nohttp {
source.exclude "modules/ROOT/**/build/**"
}

jar {
enabled = false
enabled = false
}

javadoc {
enabled = false
}

repositories {
mavenCentral()
enabled = false
}

dependencies {
implementation project(":micrometer-tracing")
implementation 'ch.qos.logback:logback-classic'
implementation 'org.slf4j:slf4j-api'

testImplementation 'io.zipkin.reporter2:zipkin-sender-urlconnection'

testImplementation project(":micrometer-tracing-test")
testImplementation project(":micrometer-tracing-integration-test")
testImplementation 'org.aspectj:aspectjweaver'
testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation 'org.mockito:mockito-inline'
testImplementation 'org.assertj:assertj-core'
testImplementation 'org.springframework:spring-context'
tasks.withType(AbstractPublishToMaven).configureEach {
enabled = false
}

2 changes: 0 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,3 @@ org.gradle.caching=true
org.gradle.parallel=true
org.gradle.vfs.watch=true
nebula.dependencyLockPluginEnabled=false
# Required by antora
version=1.2.0-SNAPSHOT
4 changes: 3 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ gradleEnterprise {
server = 'https://ge.micrometer.io'
}

include 'docs', 'micrometer-tracing', 'micrometer-tracing-bom', 'benchmarks'
include 'micrometer-tracing', 'micrometer-tracing-bom', 'benchmarks'

['brave', 'otel'].each { bridge ->
include "micrometer-tracing-bridge-$bridge"
Expand All @@ -37,3 +37,5 @@ include 'docs', 'micrometer-tracing', 'micrometer-tracing-bom', 'benchmarks'
include "micrometer-tracing-$testProject"
project(":micrometer-tracing-$testProject").projectDir = new File(rootProject.projectDir, "micrometer-tracing-tests/micrometer-tracing-$testProject")
}

include 'docs'

0 comments on commit 5ce33ad

Please sign in to comment.