Skip to content

Commit ead5c97

Browse files
committed
migrate root to kotlin dsl
1 parent 7ed7220 commit ead5c97

File tree

4 files changed

+85
-72
lines changed

4 files changed

+85
-72
lines changed

build.gradle

Lines changed: 0 additions & 49 deletions
This file was deleted.

build.gradle.kts

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
import kotlinx.team.infra.*
2+
3+
buildscript {
4+
val kotlin_version: String by project
5+
val infra_version: String by project
6+
7+
repositories {
8+
maven("https://maven.pkg.jetbrains.space/kotlin/p/kotlinx/maven")
9+
gradlePluginPortal()
10+
11+
addDevRepositoryIfEnabled(this, project)
12+
}
13+
14+
dependencies {
15+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
16+
classpath("kotlinx.team:kotlinx.team.infra:$infra_version")
17+
}
18+
}
19+
20+
apply(plugin = "kotlinx.team.infra")
21+
22+
configure<InfraExtension> {
23+
teamcity {
24+
libraryStagingRepoDescription = project.name
25+
}
26+
27+
publishing {
28+
include(":kotlinx-benchmark-runtime")
29+
30+
libraryRepoUrl = "https://github.com/Kotlin/kotlinx-benchmark"
31+
32+
if (project.findProperty("publication_repository") == "sonatype") {
33+
sonatype {}
34+
}
35+
}
36+
}
37+
38+
// https://youtrack.jetbrains.com/issue/KT-48410
39+
repositories {
40+
mavenCentral()
41+
}
42+
43+
afterEvaluate {
44+
gradle.includedBuilds.forEach { included ->
45+
project(":kotlinx-benchmark-runtime").tasks.named("publishToMavenLocal").configure {
46+
dependsOn(included.task(":publishToMavenLocal"))
47+
}
48+
}
49+
}
50+
51+
allprojects {
52+
val kotlin_version: String by project
53+
val infra_version: String by project
54+
55+
logger.info("Using Kotlin $kotlin_version for project ${this.name}")
56+
repositories {
57+
addDevRepositoryIfEnabled(this, project)
58+
}
59+
}

settings.gradle

Lines changed: 0 additions & 23 deletions
This file was deleted.

settings.gradle.kts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
pluginManagement {
2+
repositories {
3+
gradlePluginPortal()
4+
val kotlinRepoUrl: String? by settings
5+
kotlinRepoUrl?.let { repoUrl ->
6+
if (repoUrl.isNotEmpty()) {
7+
maven { url = uri(repoUrl) }
8+
}
9+
}
10+
}
11+
}
12+
13+
rootProject.name = "kotlinx-benchmark"
14+
15+
includeBuild("plugin")
16+
17+
include("runtime")
18+
findProject(":runtime")?.name = "kotlinx-benchmark-runtime"
19+
20+
include("integration")
21+
22+
include("examples")
23+
include("examples:kotlin-multiplatform")
24+
include("examples:java")
25+
include("examples:kotlin")
26+
include("examples:kotlin-kts")

0 commit comments

Comments
 (0)