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 06f4235 commit 4feaa7f
Show file tree
Hide file tree
Showing 17 changed files with 95 additions and 178 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
16 changes: 5 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,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: 'com.netflix.nebula.release'
release.defaultVersionStrategy = nebula.plugin.release.git.opinion.Strategies.SNAPSHOT
}
apply plugin: 'com.netflix.nebula.release'
release.defaultVersionStrategy = nebula.plugin.release.git.opinion.Strategies.SNAPSHOT

apply plugin: 'io.github.gradle-nexus.publish-plugin'
apply from: 'dependencies.gradle'
Expand Down Expand Up @@ -298,11 +296,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-bom') {
apply plugin: 'biz.aQute.bnd.builder'
Expand Down Expand Up @@ -415,8 +410,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
1 change: 1 addition & 0 deletions config/checkstyle/checkstyle-suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<suppress checks="IllegalImport" files="test[\\/]java[\\/]io[\\/]micrometer[\\/]core[\\/]instrument[\\/]binder[\\/]jersey[\\/]server.+" />
<suppress checks="IllegalImport" files="test[\\/]java[\\/]io[\\/]micrometer[\\/]jersey.+" />
<suppress checks="IllegalImport" files="test[\\/]java[\\/]io[\\/]micrometer[\\/]core[\\/]instrument.+Tests.java" />
<suppress checks="IllegalImport" files="docs[\\/].+" />

<suppress checks="JavadocPackageCheck" files="benchmarks[\\/].+" />
<suppress checks="JavadocPackageCheck" files="samples[\\/].+" />
Expand Down
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
95 changes: 57 additions & 38 deletions docs/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,48 @@
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'
}
}

apply plugin: 'java'
apply plugin: 'io.spring.antora.generate-antora-yml'
apply plugin: 'org.antora'

description = 'Micrometer Docs'

repositories {
mavenCentral()
}

description = "Micrometer Docs"
dependencies {
implementation project(':micrometer-core')
implementation 'io.micrometer:context-propagation'
implementation 'ch.qos.logback:logback-classic'
implementation 'org.slf4j:slf4j-api'

testImplementation project(':micrometer-test')
testImplementation project(':micrometer-observation-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'
testImplementation 'io.projectreactor:reactor-core'
testImplementation 'io.projectreactor:reactor-test'
testImplementation 'io.netty:netty-transport'
testImplementation 'org.apache.httpcomponents.client5:httpclient5'
testImplementation 'io.javalin:javalin:latest.release'
}

antora {
version = '3.2.0-alpha.2'
Expand All @@ -26,23 +63,18 @@ antora {
]
}


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

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

tasks.named("antora") {
dependsOn "generateAntoraResources"
}

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

jar {
Expand All @@ -53,27 +85,14 @@ javadoc {
enabled = false
}

repositories {
mavenCentral()
tasks.withType(AbstractPublishToMaven).configureEach {
enabled = false
}

dependencies {
implementation project(":micrometer-core")
implementation 'io.micrometer:context-propagation'
implementation 'ch.qos.logback:logback-classic'
implementation 'org.slf4j:slf4j-api'

testImplementation project(":micrometer-test")
testImplementation project(":micrometer-observation-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'
testImplementation 'io.projectreactor:reactor-core'
testImplementation 'io.projectreactor:reactor-test'
testImplementation 'io.netty:netty-transport'
testImplementation 'org.apache.httpcomponents.client5:httpclient5'
testImplementation 'io.javalin:javalin:latest.release'
downloadBaseline {
enabled = false
}

japicmp {
enabled = false
}
111 changes: 0 additions & 111 deletions docs/gradle.lockfile

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2023 VMware, Inc.
*
* 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
*
* https://www.apache.org/licenses/LICENSE-2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2023 VMware, Inc.
*
* 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
*
* https://www.apache.org/licenses/LICENSE-2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2023 VMware, Inc.
*
* 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
*
* https://www.apache.org/licenses/LICENSE-2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017 VMware, Inc.
* Copyright 2023 VMware, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017 VMware, Inc.
* Copyright 2023 VMware, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017 VMware, Inc.
* Copyright 2023 VMware, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,7 +15,6 @@
*/
package io.micrometer.docs.observation;


import com.github.tomakehurst.wiremock.junit5.WireMockRuntimeInfo;
import com.github.tomakehurst.wiremock.junit5.WireMockTest;
import io.javalin.Javalin;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017 VMware, Inc.
* Copyright 2023 VMware, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/test/resources/docs-generator-build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 VMware, Inc.
* Copyright 2023 VMware, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit 4feaa7f

Please sign in to comment.