Skip to content

Commit 30b8ef2

Browse files
committed
remove getRatchetBranch and ratchetFrom from BeamModulePlugin
1 parent 459c47e commit 30b8ef2

6 files changed

Lines changed: 0 additions & 96 deletions

File tree

build.gradle.kts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,30 +26,8 @@ plugins {
2626
id("net.researchgate.release") version "2.8.1"
2727
id("org.apache.beam.module")
2828
id("org.sonarqube") version "3.0"
29-
id("com.diffplug.spotless")
3029
}
3130

32-
repositories {
33-
mavenCentral()
34-
}
35-
36-
spotless {
37-
predeclareDeps()
38-
}
39-
40-
configure<com.diffplug.gradle.spotless.SpotlessExtensionPredeclare> {
41-
java {
42-
googleJavaFormat("1.17.0")
43-
}
44-
groovy {
45-
greclipse()
46-
}
47-
groovyGradle {
48-
greclipse()
49-
}
50-
}
51-
52-
5331
/*************************************************************************************************/
5432
// Configure the root project
5533

buildSrc/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ repositories {
4444
if (useMirror) {
4545
maven { url = uri(mavenCentralMirrorUrl!!) }
4646
}
47-
mavenCentral()
4847
maven { url = uri("https://plugins.gradle.org/m2/") }
4948
maven {
5049
url = uri("https://repo.spring.io/plugins-release/")

buildSrc/settings.gradle.kts

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

buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -507,40 +507,7 @@ class BeamModulePlugin implements Plugin<Project> {
507507

508508
project.ext.mavenGroupId = 'org.apache.beam'
509509

510-
project.ext.getRatchetBranch = {
511-
->
512-
if (project.hasProperty('disableSpotlessRatchet') && project.disableSpotlessRatchet == 'true') {
513-
return null
514-
}
515-
try {
516-
def checkRef = { ref ->
517-
try {
518-
def res = project.exec {
519-
executable 'git'
520-
args 'rev-parse', '--verify', ref
521-
ignoreExitValue = true
522-
standardOutput = new ByteArrayOutputStream()
523-
errorOutput = new ByteArrayOutputStream()
524-
}
525-
return res.getExitValue() == 0
526-
} catch (Exception e) {
527-
return false
528-
}
529-
}
530510

531-
if (checkRef('upstream/master')) {
532-
return 'upstream/master'
533-
} else if (checkRef('origin/master')) {
534-
return 'origin/master'
535-
} else if (checkRef('master')) {
536-
return 'master'
537-
} else {
538-
return null
539-
}
540-
} catch (Exception e) {
541-
return null
542-
}
543-
}
544511

545512
// Default to dash-separated directories for artifact base name,
546513
// which will also be the default artifactId for maven publications
@@ -1498,10 +1465,6 @@ class BeamModulePlugin implements Plugin<Project> {
14981465
project.disableSpotlessCheck == 'true'
14991466
project.spotless {
15001467
enforceCheck !disableSpotlessCheck
1501-
def ratchetBranch = project.ext.getRatchetBranch()
1502-
if (ratchetBranch != null) {
1503-
ratchetFrom ratchetBranch
1504-
}
15051468
java {
15061469
licenseHeader javaLicenseHeader
15071470
googleJavaFormat('1.17.0')
@@ -2426,10 +2389,6 @@ class BeamModulePlugin implements Plugin<Project> {
24262389
project.disableSpotlessCheck == 'true'
24272390
project.spotless {
24282391
enforceCheck !disableSpotlessCheck
2429-
def ratchetBranch = project.ext.getRatchetBranch()
2430-
if (ratchetBranch != null) {
2431-
ratchetFrom ratchetBranch
2432-
}
24332392
def grEclipseConfig = project.project(":").file("buildSrc/greclipse.properties")
24342393
groovy {
24352394
greclipse().configFile(grEclipseConfig)

runners/flink/build.gradle

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ repositories {
2828
* We configure spotless here once in order to only check these java sources once.
2929
*/
3030
spotless {
31-
def ratchetBranch = project.rootProject.hasProperty('getRatchetBranch') ? project.rootProject.ext.getRatchetBranch() : null
32-
if (ratchetBranch != null) {
33-
ratchetFrom ratchetBranch
34-
}
3531
java {
3632
licenseHeader org.apache.beam.gradle.BeamModulePlugin.javaLicenseHeader
3733
googleJavaFormat('1.17.0')

runners/spark/build.gradle

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ repositories {
2828
* We configure spotless here once in order to only check these java sources once.
2929
*/
3030
spotless {
31-
def ratchetBranch = project.rootProject.hasProperty('getRatchetBranch') ? project.rootProject.ext.getRatchetBranch() : null
32-
if (ratchetBranch != null) {
33-
ratchetFrom ratchetBranch
34-
}
3531
java {
3632
licenseHeader org.apache.beam.gradle.BeamModulePlugin.javaLicenseHeader
3733
googleJavaFormat('1.17.0')

0 commit comments

Comments
 (0)