Skip to content

Commit

Permalink
update bcv, move test-utils api dumps to new test-fixture api dumps
Browse files Browse the repository at this point in the history
  • Loading branch information
aSemy committed Jun 3, 2023
1 parent ba8bc2b commit 34f47d4
Show file tree
Hide file tree
Showing 12 changed files with 106 additions and 101 deletions.
3 changes: 2 additions & 1 deletion build-logic/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ plugins {

kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(8))
languageVersion.set(JavaLanguageVersion.of(11))
}
}

dependencies {
implementation(libs.gradlePlugin.dokka)
implementation(libs.gradlePlugin.kotlin)
implementation(libs.gradlePlugin.shadow)
implementation(libs.gradlePlugin.binaryCompatibilityValidator)

// workaround for accessing version-catalog in convention plugins
// https://github.com/gradle/gradle/issues/15383#issuecomment-779893192
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package org.jetbrains.conventions

import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin
import org.gradle.internal.component.external.model.TestFixturesSupport.TEST_FIXTURE_SOURCESET_NAME

plugins {
id("org.jetbrains.conventions.base")
`maven-publish`
signing
id("org.jetbrains.conventions.dokka")
id("dev.adamko.kotlin.binary-compatibility-validator")
}

val javadocJar by tasks.registering(Jar::class) {
Expand Down Expand Up @@ -66,3 +68,9 @@ plugins.withType<ShadowPlugin>().configureEach {
val javaComponent = components["java"] as AdhocComponentWithVariants
javaComponent.withVariantsFromConfiguration(configurations["shadowRuntimeElements"]) { skip() }
}

binaryCompatibilityValidator {
targets.matching { it.name == TEST_FIXTURE_SOURCESET_NAME }.configureEach {
enabled.set(true)
}
}
18 changes: 0 additions & 18 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ plugins {
id("org.jetbrains.conventions.base")
id("org.jetbrains.conventions.dokka")

alias(libs.plugins.kotlinx.binaryCompatibilityValidator)
alias(libs.plugins.gradlePublish)
alias(libs.plugins.nexusPublish)
}
Expand Down Expand Up @@ -34,20 +33,3 @@ val dokkaPublish by tasks.registering {
finalizedBy(tasks.named("closeAndReleaseSonatypeStagingRepository"))
}
}

apiValidation {
// note that subprojects are ignored by their name, not their path https://github.com/Kotlin/binary-compatibility-validator/issues/16
ignoredProjects += setOf(
// NAME PATH
"frontend", // :plugins:base:frontend

"kotlin-analysis", // :kotlin-analysis
"compiler-dependency", // :kotlin-analysis:compiler-dependency
"intellij-dependency", // :kotlin-analysis:intellij-dependency

"integration-tests", // :integration-tests
"gradle", // :integration-tests:gradle
"cli", // :integration-tests:cli
"maven", // integration-tests:maven
)
}
File renamed without changes.
81 changes: 81 additions & 0 deletions core/test-api/api/test-api.api → core/api/testFixtures/core.api
Original file line number Diff line number Diff line change
@@ -1,3 +1,84 @@
public final class matchers/content/ContentMatcherBuilder {
public fun <init> (Lkotlin/reflect/KClass;)V
public final fun build ()Lorg/jetbrains/dokka/test/tools/matchers/content/CompositeMatcher;
public final fun getChildren ()Ljava/util/List;
public final fun unaryPlus (Ljava/lang/String;)V
}

public abstract interface annotation class matchers/content/ContentMatchersDsl : java/lang/annotation/Annotation {
}

public final class matchers/content/ContentMatchersDslKt {
public static final fun after (Lmatchers/content/ContentMatcherBuilder;Lkotlin/jvm/functions/Function1;)V
public static final fun assertNode (Lorg/jetbrains/dokka/pages/ContentNode;Lkotlin/jvm/functions/Function1;)V
public static final fun before (Lmatchers/content/ContentMatcherBuilder;Lkotlin/jvm/functions/Function1;)V
public static final fun br (Lmatchers/content/ContentMatcherBuilder;)V
public static final fun caption (Lmatchers/content/ContentMatcherBuilder;Lkotlin/jvm/functions/Function1;)V
public static final fun check (Lmatchers/content/ContentMatcherBuilder;Lkotlin/jvm/functions/Function1;)V
public static final fun codeBlock (Lmatchers/content/ContentMatcherBuilder;Lkotlin/jvm/functions/Function1;)V
public static final fun codeInline (Lmatchers/content/ContentMatcherBuilder;Lkotlin/jvm/functions/Function1;)V
public static final fun divergent (Lmatchers/content/ContentMatcherBuilder;Lkotlin/jvm/functions/Function1;)V
public static final fun divergentGroup (Lmatchers/content/ContentMatcherBuilder;Lkotlin/jvm/functions/Function1;)V
public static final fun divergentInstance (Lmatchers/content/ContentMatcherBuilder;Lkotlin/jvm/functions/Function1;)V
public static final fun group (Lmatchers/content/ContentMatcherBuilder;Lkotlin/jvm/functions/Function1;)V
public static final fun hasExactText (Lmatchers/content/ContentMatcherBuilder;Ljava/lang/String;)V
public static final fun header (Lmatchers/content/ContentMatcherBuilder;Ljava/lang/Integer;Lkotlin/jvm/functions/Function1;)V
public static synthetic fun header$default (Lmatchers/content/ContentMatcherBuilder;Ljava/lang/Integer;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
public static final fun link (Lmatchers/content/ContentMatcherBuilder;Lkotlin/jvm/functions/Function1;)V
public static final fun list (Lmatchers/content/ContentMatcherBuilder;Lkotlin/jvm/functions/Function1;)V
public static final fun p (Lmatchers/content/ContentMatcherBuilder;Lkotlin/jvm/functions/Function1;)V
public static final fun platformHinted (Lmatchers/content/ContentMatcherBuilder;Lkotlin/jvm/functions/Function1;)V
public static final fun skipAllNotMatching (Lmatchers/content/ContentMatcherBuilder;)V
public static final fun somewhere (Lmatchers/content/ContentMatcherBuilder;Lkotlin/jvm/functions/Function1;)V
public static final fun tab (Lmatchers/content/ContentMatcherBuilder;Lorg/jetbrains/dokka/pages/TabbedContentType;Lkotlin/jvm/functions/Function1;)V
public static final fun tabbedGroup (Lmatchers/content/ContentMatcherBuilder;Lkotlin/jvm/functions/Function1;)V
public static final fun table (Lmatchers/content/ContentMatcherBuilder;Lkotlin/jvm/functions/Function1;)V
}

public final class org/jetbrains/dokka/test/tools/matchers/content/Anything : org/jetbrains/dokka/test/tools/matchers/content/MatcherElement {
public static final field INSTANCE Lorg/jetbrains/dokka/test/tools/matchers/content/Anything;
}

public final class org/jetbrains/dokka/test/tools/matchers/content/CompositeMatcher : org/jetbrains/dokka/test/tools/matchers/content/NodeMatcher {
public fun <init> (Lkotlin/reflect/KClass;Ljava/util/List;Lkotlin/jvm/functions/Function1;)V
public synthetic fun <init> (Lkotlin/reflect/KClass;Ljava/util/List;Lkotlin/jvm/functions/Function1;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun tryMatch (Lorg/jetbrains/dokka/pages/ContentNode;)V
}

public abstract class org/jetbrains/dokka/test/tools/matchers/content/MatcherElement {
}

public final class org/jetbrains/dokka/test/tools/matchers/content/MatcherError : java/lang/AssertionError {
public fun <init> (Ljava/lang/String;Lorg/jetbrains/dokka/test/tools/matchers/content/MatcherElement;ZLjava/lang/Throwable;)V
public synthetic fun <init> (Ljava/lang/String;Lorg/jetbrains/dokka/test/tools/matchers/content/MatcherElement;ZLjava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ljava/lang/String;
public final fun component2 ()Lorg/jetbrains/dokka/test/tools/matchers/content/MatcherElement;
public final fun component3 ()Z
public final fun component4 ()Ljava/lang/Throwable;
public final fun copy (Ljava/lang/String;Lorg/jetbrains/dokka/test/tools/matchers/content/MatcherElement;ZLjava/lang/Throwable;)Lorg/jetbrains/dokka/test/tools/matchers/content/MatcherError;
public static synthetic fun copy$default (Lorg/jetbrains/dokka/test/tools/matchers/content/MatcherError;Ljava/lang/String;Lorg/jetbrains/dokka/test/tools/matchers/content/MatcherElement;ZLjava/lang/Throwable;ILjava/lang/Object;)Lorg/jetbrains/dokka/test/tools/matchers/content/MatcherError;
public fun equals (Ljava/lang/Object;)Z
public final fun getAnchor ()Lorg/jetbrains/dokka/test/tools/matchers/content/MatcherElement;
public final fun getAnchorAfter ()Z
public fun getCause ()Ljava/lang/Throwable;
public fun getMessage ()Ljava/lang/String;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public class org/jetbrains/dokka/test/tools/matchers/content/NodeMatcher : org/jetbrains/dokka/test/tools/matchers/content/MatcherElement {
public fun <init> (Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function1;)V
public synthetic fun <init> (Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function1;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun getAssertions ()Lkotlin/jvm/functions/Function1;
public final fun getKclass ()Lkotlin/reflect/KClass;
public fun tryMatch (Lorg/jetbrains/dokka/pages/ContentNode;)V
}

public final class org/jetbrains/dokka/test/tools/matchers/content/TextMatcher : org/jetbrains/dokka/test/tools/matchers/content/MatcherElement {
public fun <init> (Ljava/lang/String;)V
public final fun getText ()Ljava/lang/String;
}

public final class org/jetbrains/dokka/testApi/context/MockContext : org/jetbrains/dokka/plugability/DokkaContext {
public fun <init> ([Lkotlin/Pair;Lorg/jetbrains/dokka/DokkaConfiguration;Ljava/util/List;)V
public synthetic fun <init> ([Lkotlin/Pair;Lorg/jetbrains/dokka/DokkaConfiguration;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
Expand Down
81 changes: 0 additions & 81 deletions core/content-matcher-test-utils/api/content-matcher-test-utils.api

This file was deleted.

4 changes: 3 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ gradlePlugin-shadow = "7.1.2"
gradlePlugin-nexusPublish = "1.1.0"
gradlePlugin-gradlePluginPublish = "0.20.0"
gradlePlugin-gradleNode = "3.5.1"
gradlePlugin-bcvMu = "0.0.4"

## Test
junit = "5.9.2"
Expand All @@ -58,6 +59,7 @@ gradlePlugin-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", ve
gradlePlugin-android = { module = "com.android.tools.build:gradle", version.ref = "gradlePlugin-android" }
gradlePlugin-dokka = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "gradlePlugin-dokka" }
gradlePlugin-shadow = { module = "gradle.plugin.com.github.johnrengelman:shadow", version.ref = "gradlePlugin-shadow" }
gradlePlugin-binaryCompatibilityValidator = { module = "dev.adamko.kotlin.binary_compatibility_validator:bcv-gradle-plugin", version.ref = "gradlePlugin-bcvMu" }

#### Kotlin analysis ####
kotlin-compiler = { module = "org.jetbrains.kotlin:kotlin-compiler", version.ref = "kotlin-compiler" }
Expand Down Expand Up @@ -106,7 +108,7 @@ junit-jupiter = { module = "org.junit.jupiter:junit-jupiter" }
# (Before defining plugins here, first consider creating convention plugins instead,
# and define the Maven coordinates above to be used in build-logic/build.gradle.kts)

kotlinx-binaryCompatibilityValidator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "kotlinx-bcv" }
#kotlinx-binaryCompatibilityValidator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "kotlinx-bcv" }
shadow = { id = "com.github.johnrengelman.shadow", version.ref = "gradlePlugin-shadow" }
gradlePublish = { id = "com.gradle.plugin-publish", version.ref = "gradlePlugin-gradlePluginPublish" }
nexusPublish = { id = "io.github.gradle-nexus.publish-plugin", version.ref = "gradlePlugin-nexusPublish" }
Expand Down
4 changes: 4 additions & 0 deletions kotlin-analysis/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ dependencies {
registerDokkaArtifactPublication("dokkaAnalysis") {
artifactId = "dokka-analysis"
}

binaryCompatibilityValidator {
enabled.set(false)
}
4 changes: 4 additions & 0 deletions kotlin-analysis/compiler-dependency/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@ registerDokkaArtifactPublication("kotlinAnalysisCompiler") {
artifactId = "kotlin-analysis-compiler"
component = Shadow
}

binaryCompatibilityValidator {
enabled.set(false)
}
4 changes: 4 additions & 0 deletions kotlin-analysis/intellij-dependency/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,7 @@ registerDokkaArtifactPublication("kotlinAnalysisIntelliJ") {
artifactId = "kotlin-analysis-intellij"
component = Shadow
}

binaryCompatibilityValidator {
enabled.set(false)
}
File renamed without changes.
File renamed without changes.

0 comments on commit 34f47d4

Please sign in to comment.