[repo] Move buildSrc into repo/gradle-build-conventions/buildsrc-compat project

Include new project as build logic included build. Such change will
allow us to start migration into build convention plugins by splitting
buildSrc logic into subprojects.
This commit is contained in:
Yahor Berdnikau
2023-06-23 19:48:53 +02:00
committed by Space Team
parent 4a598afc36
commit 5b5dae9249
53 changed files with 36 additions and 33 deletions
-2
View File
@@ -45,8 +45,6 @@
/build-common/ "Kotlin Build Tools"
/buildSrc/ "Kotlin Build Infrastructure"
/compiler/android-tests/ "Kotlin JVM"
/compiler/backend/ "Kotlin JVM"
/compiler/backend.common.jvm/ "Kotlin JVM"
+1 -1
View File
@@ -33,7 +33,7 @@ plugins {
base
idea
id("jps-compatible")
id("org.jetbrains.gradle.plugin.idea-ext")
id("org.jetbrains.gradle.plugin.idea-ext") version "1.0.1" // this version should be in sync with repo/buildsrc-compat/build.gradle.kts
id("org.gradle.crypto.checksum") version "1.4.0"
id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.13.1" apply false
signing
+1 -1
View File
@@ -26,7 +26,7 @@ val androidStudioVersion = if (extra.has("versions.androidStudioRelease"))
else
null
val intellijVersion = rootProject.extra["versions.intellijSdk"] as String
val intellijVersion = extra["versions.intellijSdk"] as String
val intellijVersionDelimiterIndex = intellijVersion.indexOfAny(charArrayOf('.', '-'))
if (intellijVersionDelimiterIndex == -1) {
error("Invalid IDEA version $intellijVersion")
@@ -13,7 +13,7 @@ import org.jetbrains.kotlin.konan.target.Family.*
import org.jetbrains.kotlin.konan.target.HostManager.Companion.hostIsMac
plugins {
`kotlin`
id("org.jetbrains.kotlin.jvm")
id("kotlin.native.build-tools-conventions")
id("native-interop-plugin")
id("native")
@@ -8,7 +8,7 @@ import org.jetbrains.kotlin.tools.solib
import org.jetbrains.kotlin.*
plugins {
kotlin
id("org.jetbrains.kotlin.jvm")
id("native")
}
@@ -36,7 +36,6 @@ dependencies {
implementation("org.jetbrains.kotlin:kotlin-native-utils:${project.bootstrapKotlinVersion}")
// To build Konan Gradle plugin
implementation("org.jetbrains.kotlin:kotlin-build-common:${project.bootstrapKotlinVersion}")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:${project.bootstrapKotlinVersion}")
val versionProperties = Properties()
+1 -1
View File
@@ -6,7 +6,7 @@ import groovy.util.Node
import groovy.util.NodeList
plugins {
`kotlin-multiplatform` apply false
id("org.jetbrains.kotlin.multiplatform") apply false
base
`maven-publish`
signing
@@ -26,7 +26,6 @@ class CodeConformanceTest : TestCase() {
".idea",
"build/js",
"build/tmp",
"buildSrc",
"compiler/build",
"compiler/fir/lightTree/testData",
"compiler/testData/psi/kdoc",
@@ -80,8 +79,6 @@ class CodeConformanceTest : TestCase() {
File("."),
listOf(
"build",
"buildSrc/build/generated-sources",
"buildSrc/prepare-deps/build",
"compiler/ir/serialization.js/build/fullRuntime",
"compiler/ir/serialization.js/build/reducedRuntime/src/libraries/stdlib/js-ir/runtime/longjs.kt",
"dependencies",
@@ -108,6 +105,7 @@ class CodeConformanceTest : TestCase() {
"libraries/stdlib/js-v1/.gradle",
"libraries/stdlib/js-v1/build",
"libraries/stdlib/js-v1/node_modules",
"libraries/stdlib/jvm/build",
"libraries/stdlib/jvm-minimal-for-test/build",
"libraries/stdlib/wasm/build",
"libraries/tools/atomicfu/build",
@@ -142,6 +140,7 @@ class CodeConformanceTest : TestCase() {
"repo/gradle-settings-conventions/jvm-toolchain-provisioning/build/generated-sources",
"repo/gradle-settings-conventions/gradle-enterprise/build/generated-sources",
"repo/gradle-settings-conventions/kotlin-daemon-config/build/generated-sources",
"repo/gradle-build-conventions/buildsrc-compat/build/generated-sources",
".gradle/expanded",
)
)
+7
View File
@@ -0,0 +1,7 @@
## Description
Provides common build convention plugins for the repo.
### List of plugins
- "buildsrc-compat" — migrated 'buildSrc' project. Will exist until it will be separated into different convention plugins.
@@ -4,7 +4,7 @@ buildscript {
// workaround for KGP build metrics reports: https://github.com/gradle/gradle/issues/20001
project.extensions.extraProperties["kotlin.build.report.output"] = null
val versionPropertiesFile = project.rootProject.projectDir.parentFile.resolve("gradle/versions.properties")
val versionPropertiesFile = project.rootProject.projectDir.parentFile.resolve("../gradle/versions.properties")
val versionProperties = java.util.Properties()
versionPropertiesFile.inputStream().use { propInput ->
versionProperties.load(propInput)
@@ -24,7 +24,7 @@ logger.info("buildSrc kotlin compiler version: " + org.jetbrains.kotlin.config.K
logger.info("buildSrc stdlib version: " + KotlinVersion.CURRENT)
apply {
from("../gradle/checkCacheability.gradle.kts")
from("../../../gradle/checkCacheability.gradle.kts")
}
plugins {
@@ -52,8 +52,8 @@ fun Project.getBooleanProperty(name: String): Boolean? = this.findProperty(name)
else v.toBoolean()
}
rootProject.apply {
from(rootProject.file("../gradle/versions.gradle.kts"))
project.apply {
from(rootProject.file("../../gradle/versions.gradle.kts"))
}
val isTeamcityBuild = kotlinBuildProperties.isTeamcityBuild
@@ -70,7 +70,7 @@ extra["customDepsOrg"] = "kotlin.build"
repositories {
mavenCentral()
maven("https://maven.google.com/")
google()
maven("https://packages.jetbrains.team/maven/p/ij/intellij-dependencies")
maven("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-dependencies")
gradlePluginPortal()
@@ -104,15 +104,17 @@ dependencies {
implementation("com.jakewharton.dex:dex-member-list:4.1.1")
implementation("gradle.plugin.com.github.johnrengelman:shadow:${rootProject.extra["versions.shadow"]}") {
implementation("gradle.plugin.com.github.johnrengelman:shadow:${project.extra["versions.shadow"]}") {
// https://github.com/johnrengelman/shadow/issues/807
exclude("org.ow2.asm")
}
implementation("net.sf.proguard:proguard-gradle:6.2.2")
// Version should be in sync with <root>/build.gradle.kts
implementation("gradle.plugin.org.jetbrains.gradle.plugin.idea-ext:gradle-idea-ext:1.0.1")
implementation("io.ktor:ktor-client-core:${rootProject.extra["versions.ktor-client-core"]}")
implementation("io.ktor:ktor-client-cio:${rootProject.extra["versions.ktor-client-cio"]}")
implementation("io.ktor:ktor-client-core:${project.extra["versions.ktor-client-core"]}")
implementation("io.ktor:ktor-client-cio:${project.extra["versions.ktor-client-cio"]}")
compileOnly("com.gradle:gradle-enterprise-gradle-plugin:3.12.4")
@@ -3,9 +3,6 @@ org.gradle.kotlin.dsl.allWarningsAsErrors=true
cacheRedirectorEnabled=true
#buildSrc.kotlin.repo=https://jcenter.bintray.com
#buildSrc.kotlin.version=1.1.50
kotlin.build.gradlePlugin.version=0.0.39
kotlin.options.suppressFreeCompilerArgsModificationWarning=true
@@ -1,16 +1,13 @@
import org.gradle.api.internal.GradleInternal
pluginManagement {
apply from: '../repo/scripts/cache-redirector.settings.gradle.kts'
apply from: '../repo/scripts/kotlin-bootstrap.settings.gradle.kts'
apply from: '../scripts/cache-redirector.settings.gradle.kts'
apply from: '../scripts/kotlin-bootstrap.settings.gradle.kts'
if (((GradleInternal) gradle).isRootBuild()) {
includeBuild '../repo/gradle-settings-conventions'
}
includeBuild '../gradle-settings-conventions'
repositories {
maven { url "https://maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-dependencies" }
mavenCentral()
google()
gradlePluginPortal()
}
}
@@ -22,7 +19,7 @@ plugins {
id "kotlin-daemon-config"
}
File versionPropertiesFile = new File(rootProject.projectDir.parentFile, "gradle/versions.properties")
File versionPropertiesFile = new File(rootProject.projectDir.parentFile, "../gradle/versions.properties")
def versionProperties = new Properties()
versionPropertiesFile.withInputStream {
versionProperties.load(it)
@@ -44,4 +41,5 @@ dependencyResolutionManagement {
}
}
include "prepare-deps"
include ":buildsrc-compat"
include ":prepare-deps"
@@ -64,7 +64,7 @@ fun getRootSettings(
val gradleInternal = (gradle as GradleInternal)
return when {
gradleInternal.isRootBuild() ||
settings.rootProject.name == "gradle-settings-conventions" -> {
setOf("gradle-settings-conventions", "gradle-build-conventions").contains(settings.rootProject.name) -> {
settings
}
else -> {
@@ -91,6 +91,7 @@ val kotlinRootDir: File = when (rootSettings.rootProject.name) {
}
"benchmarksAnalyzer", "performance-server" -> rootSettings.rootDir.parentFile.parentFile.parentFile
"gradle-settings-conventions" -> rootSettings.rootDir.parentFile.parentFile
"gradle-build-conventions" -> rootSettings.rootDir.parentFile.parentFile
"performance" -> rootSettings.rootDir.parentFile.parentFile
"ui" -> rootSettings.rootDir.parentFile.parentFile.parentFile.parentFile
else -> rootSettings.rootDir
+2
View File
@@ -1,11 +1,13 @@
pluginManagement {
includeBuild("repo/gradle-settings-conventions")
includeBuild("repo/gradle-build-conventions")
apply from: 'repo/scripts/cache-redirector.settings.gradle.kts'
apply from: 'repo/scripts/kotlin-bootstrap.settings.gradle.kts'
repositories {
maven { url "https://maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-dependencies" }
google()
mavenCentral()
gradlePluginPortal()
}