Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove buildSrc #2379

Merged
merged 1 commit into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 4 additions & 57 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ buildscript {
}

plugins {
// Java static analysis plugins. Keep versions consistent with
// ./buildSrc/build.gradle.kts
// Java static analysis plugins.

// Re-enable when compatible with Gradle 8
// id 'nebula.lint' version '16.0.2'
Expand Down Expand Up @@ -68,44 +67,12 @@ wrapper {
distributionType = Wrapper.DistributionType.ALL
}

apply plugin: google.registry.gradle.plugin.ReportUploaderPlugin

reportUploader {
// Set the location where we want to upload the build results.
// e.g. -P uploaderDestination=gcs://domain-registry-alpha-build-result-test
//
// If not set - the upload will be skipped
destination = uploaderDestination

// The location of the file containing the OAuth2 Google Cloud credentials.
//
// The file can contain a Service Account key file in JSON format from the
// Google Developers Console or a stored user credential using the format
// supported by the Cloud SDK.
//
// If no file is given - the default credentials are used.
credentialsFile = uploaderCredentialsFile

// If set to 'yes', each file will be uploaded to GCS in a separate thread.
// This is MUCH faster.
multithreadedUpload = uploaderMultithreadedUpload
}

apply from: 'dependencies.gradle'

apply from: 'dependency_lic.gradle'

apply from: 'utils.gradle'

// Custom task to run checkLicense in buildSrc, which is not triggered
// by root project tasks. A shell task is used because buildSrc tasks
// cannot be referenced in the same way as tasks from a regular included
// build.
task checkBuildSrcLicense(type:Exec) {
workingDir "${rootDir}/buildSrc"
commandLine '../gradlew', 'checkLicense'
}
tasks.checkLicense.dependsOn(tasks.checkBuildSrcLicense)
tasks.build.dependsOn(tasks.checkLicense)

// Provide defaults for all of the project properties.
Expand Down Expand Up @@ -452,9 +419,6 @@ if (verboseTestOutput.toBoolean()) {
}

task checkDependenciesDotGradle {
def buildSrcDepsFile = File.createTempFile('buildSrc', 'deps')
buildSrcDepsFile.deleteOnExit()
dependsOn createGetBuildSrcDirectDepsTask(buildSrcDepsFile)

doLast {
Set<String> depsInUse = []
Expand All @@ -467,9 +431,7 @@ task checkDependenciesDotGradle {
}
}
}
if (buildSrcDepsFile.exists()) {
depsInUse.addAll(buildSrcDepsFile.readLines())
}

def unusedDeps =
rootProject.dependencyMap.keySet()
.findAll { !depsInUse.contains(it) }
Expand All @@ -486,17 +448,6 @@ task checkDependenciesDotGradle {
}
tasks.build.dependsOn(tasks.checkDependenciesDotGradle)

def createGetBuildSrcDirectDepsTask(outputFileName) {
return tasks
.create(
"getBuildSrcDeps_${java.util.UUID.randomUUID()}".toString(),
Exec) {
workingDir "${rootDir}/buildSrc"
commandLine '../gradlew', 'exportDependencies',
"-PdependencyExportFile=${outputFileName}"
}
}

rootProject.ext {
invokeJavaDiffFormatScript = { action ->
def javaHome = project.findProperty('org.gradle.java.home')
Expand All @@ -507,12 +458,8 @@ rootProject.ext {
javaBin = ext.execInBash("which java", rootDir)
}
println("Running the formatting tool with $javaBin")
def scriptDir = rootDir.path.endsWith('buildSrc')
? "${rootDir}/../java-format"
: "${rootDir}/java-format"
def workingDir = rootDir.path.endsWith('buildSrc')
? "${rootDir}/.."
: rootDir
def scriptDir = "${rootDir}/java-format"
def workingDir = rootDir
def formatDiffScript = "${scriptDir}/google-java-format-git-diff.sh"
def pythonExe = getPythonExecutable()

Expand Down
129 changes: 0 additions & 129 deletions buildSrc/build.gradle.kts

This file was deleted.

29 changes: 0 additions & 29 deletions buildSrc/buildscript-gradle.lockfile

This file was deleted.

109 changes: 0 additions & 109 deletions buildSrc/gradle.lockfile

This file was deleted.

3 changes: 0 additions & 3 deletions buildSrc/gradle.properties

This file was deleted.

Loading