-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
93 lines (80 loc) · 2.38 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
import buildsrc.utils.excludeProjectConfigurationDirs
import buildsrc.utils.skipTestFixturesPublications
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
buildsrc.conventions.`kotlin-gradle-plugin`
dev.adamko.kotlin.`binary-compatibility-validator`
`java-test-fixtures`
idea
}
project.version = "0.5.0-SNAPSHOT"
project.group = "dev.adamko.gradle"
dependencies {
testFixturesApi(gradleTestKit())
testFixturesApi(platform(libs.kotest.bom))
testFixturesApi(libs.kotest.runnerJUnit5)
testFixturesApi(libs.kotest.assertionsCore)
}
@Suppress("UnstableApiUsage")
gradlePlugin {
isAutomatedPublishing = true
website = "https://github.com/adamko-dev/dev-publish-plugin"
vcsUrl = "https://github.com/adamko-dev/dev-publish-plugin.git"
plugins.register("DevPublish") {
id = "dev.adamko.dev-publish"
displayName = "DevPublish"
description = "Publish Gradle Projects to a project-local repository, for functional testing"
implementationClass = "dev.adamko.gradle.dev_publish.DevPublishPlugin"
tags.addAll(
"maven",
"publishing",
"maven-publish",
"test",
"verify",
"check",
"functional-test",
"integration-test",
"publication",
)
}
}
val testMavenRepoDir = layout.buildDirectory.dir("test-maven-repo")
val projectTestTempDir = layout.buildDirectory.dir("project-tests")
publishing {
repositories {
maven(testMavenRepoDir) {
name = "TestMavenRepo"
}
}
}
binaryCompatibilityValidator {
ignoredMarkers.addAll(
"dev.adamko.gradle.dev_publish.internal.DevPublishInternalApi",
)
}
skipTestFixturesPublications()
tasks.withType<Test>().configureEach {
dependsOn("publishAllPublicationsToTestMavenRepoRepository")
systemProperty("testMavenRepoDir", testMavenRepoDir.get().asFile.invariantSeparatorsPath)
systemProperty("projectTestTempDir", projectTestTempDir.get().asFile.invariantSeparatorsPath)
// Remove Kotest autoscan.disable when Kotest version >= 6.0
systemProperty("kotest.framework.classpath.scanning.autoscan.disable", true)
}
tasks.withType<KotlinCompile>().configureEach {
compilerOptions {
optIn.addAll(
"dev.adamko.gradle.dev_publish.internal.DevPublishInternalApi",
)
}
}
idea {
module {
excludeProjectConfigurationDirs(layout, providers)
excludeDirs.addAll(
layout.files(
".idea",
"gradle/wrapper",
)
)
}
}