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

Revert adding eclipse annotation processing/goomph to baseline #2279

Merged
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
7 changes: 7 additions & 0 deletions changelog/@unreleased/pr-2279.v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
type: fix
fix:
description: Removed built in support for eclipse annotation processor configurations
- please use [gradle-processors](https://github.com/palantir/gradle-processors)
instead if using eclipse.
links:
- https://github.com/palantir/gradle-baseline/pull/2279
142 changes: 0 additions & 142 deletions gradle-baseline-java/baseline-class-uniqueness.lock

This file was deleted.

1 change: 0 additions & 1 deletion gradle-baseline-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ dependencies {
// Add an explicit dependency to ensure consumers can use JDK14 source compat
implementation 'org.ow2.asm:asm'
implementation 'com.googlecode.java-diff-utils:diffutils'
implementation 'com.diffplug.gradle:goomph'
implementation 'com.palantir.gradle.utils:lazily-configured-mapping'

runtimeOnly 'com.palantir.javaformat:gradle-palantir-java-format'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ package com.palantir.baseline.plugins
import org.gradle.api.Project
import org.gradle.api.plugins.JavaPlugin
import org.gradle.plugins.ide.eclipse.EclipsePlugin
import org.gradle.plugins.ide.eclipse.model.ClasspathEntry
import org.gradle.plugins.ide.eclipse.model.SourceFolder

/**
* Configures the Gradle 'eclipse' task with Baseline settings.
Expand Down Expand Up @@ -67,26 +65,12 @@ class BaselineEclipse extends AbstractBaselinePlugin {
return sb.toString()
}

static void ignoreOptionalProblems(def entries, String pathParam, boolean isTest) {
ClasspathEntry entry = entries.find { it.path == pathParam }
if (entry instanceof SourceFolder) {
SourceFolder sf = (SourceFolder) entry
Map<String, Object> attributes = sf.getEntryAttributes()
attributes.put('ignore_optional_problems', 'true')
attributes.put('optional', 'true')
if (isTest) {
attributes.put('test', 'true')
}
}
}

void apply(Project project) {
this.project = project

// Configure Eclipse JDT Core by merging in Baseline settings.
project.plugins.withType(JavaPlugin, { plugin ->
project.plugins.apply EclipsePlugin
project.plugins.apply 'com.diffplug.eclipse.apt'
project.afterEvaluate {
project.eclipse {
if (jdt != null) {
Expand Down Expand Up @@ -153,20 +137,6 @@ class BaselineEclipse extends AbstractBaselinePlugin {
containers.add(eclipseClassPath)
}
}

project.eclipse.jdt.apt {
genSrcDir = "generated_src"
genTestSrcDir = "generated_testSrc"
}
project.eclipse.classpath?.file?.whenMerged {
ignoreOptionalProblems(entries, "generated_src", false)
ignoreOptionalProblems(entries, "generated_testSrc", true)
}
// entries are appended instead of replaced, so delete the file first
project.tasks.eclipseFactorypath.doFirst {
def factoryPath = project.file(".factorypath")
factoryPath.delete()
}
}
})
}
Expand Down
33 changes: 7 additions & 26 deletions versions.lock
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
# Run ./gradlew --write-locks to regenerate this file
biz.aQute.bnd:biz.aQute.bnd.util:6.1.0 (1 constraints: ba0cc416)
biz.aQute.bnd:biz.aQute.bndlib:6.1.0 (1 constraints: be0b10ea)
classworlds:classworlds:1.1-alpha-2 (1 constraints: 3c1559a6)
com.diffplug.durian:durian-collect:1.2.0 (4 constraints: 063d2428)
com.diffplug.durian:durian-core:1.2.0 (5 constraints: df4b51b4)
com.diffplug.durian:durian-io:1.2.0 (2 constraints: cc1e3a85)
com.diffplug.durian:durian-swt.os:3.5.0 (1 constraints: bf0b0dea)
com.diffplug.gradle:goomph:3.35.0 (1 constraints: 3d054c3b)
com.diffplug.spotless:spotless-lib:2.25.3 (3 constraints: de3033b4)
com.diffplug.durian:durian-collect:1.2.0 (3 constraints: 4d313bd2)
com.diffplug.durian:durian-core:1.2.0 (4 constraints: 2640ae56)
com.diffplug.durian:durian-io:1.2.0 (1 constraints: 1313c62d)
com.diffplug.spotless:spotless-lib:2.25.3 (2 constraints: f424dde6)
com.diffplug.spotless:spotless-lib-extra:2.25.3 (1 constraints: 4c132341)
com.diffplug.spotless:spotless-plugin-gradle:6.6.0 (1 constraints: 0e051b36)
com.github.ben-manes.caffeine:caffeine:3.0.5 (1 constraints: e312a21b)
Expand Down Expand Up @@ -43,9 +39,7 @@ com.palantir.javaformat:palantir-java-format-spi:1.1.0 (1 constraints: 711560be)
com.palantir.safe-logging:preconditions:1.26.0 (6 constraints: 4b58cd5b)
com.palantir.safe-logging:safe-logging:1.26.0 (8 constraints: cb78647b)
com.palantir.tritium:tritium-registry:0.48.0 (1 constraints: 3e05473b)
com.squareup.okhttp3:okhttp:4.3.1 (1 constraints: bf0b0dea)
com.squareup.okio:okio:2.4.3 (2 constraints: 10183f8e)
commons-io:commons-io:2.11.0 (2 constraints: 1e20060b)
commons-io:commons-io:2.11.0 (1 constraints: be14ed98)
commons-lang:commons-lang:2.6 (1 constraints: ac04232c)
io.dropwizard.metrics:metrics-core:4.1.1 (1 constraints: 901088a5)
io.github.java-diff-utils:java-diff-utils:4.0 (1 constraints: 811205f6)
Expand All @@ -72,31 +66,17 @@ org.codehaus.plexus:plexus-component-annotations:2.1.1 (1 constraints: 8e142c84)
org.codehaus.plexus:plexus-container-default:1.0-alpha-9 (4 constraints: 6841d5d5)
org.codehaus.plexus:plexus-utils:1.5.1 (10 constraints: a99af4e0)
org.eclipse.jgit:org.eclipse.jgit:5.13.0.202109080827-r (3 constraints: a43f6e15)
org.eclipse.platform:org.eclipse.osgi:3.15.0 (2 constraints: c724e4f0)
org.eclipse.platform:org.eclipse.osgi.compatibility.state:1.1.600 (1 constraints: 1f0c1a02)
org.hamcrest:hamcrest:2.2 (2 constraints: 43187376)
org.hamcrest:hamcrest-core:2.2 (4 constraints: 2b2b359e)
org.hamcrest:hamcrest-library:2.2 (1 constraints: fc138e38)
org.immutables:value:2.8.8 (1 constraints: 14051536)
org.inferred:freebuilder:1.14.6 (1 constraints: 3e053b3b)
org.jetbrains:annotations:19.0.0 (2 constraints: 441cf8cc)
org.jetbrains.kotlin:kotlin-stdlib:1.3.61 (2 constraints: 0617a55e)
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.61 (2 constraints: c5196a0d)
org.mockito:mockito-core:4.5.1 (4 constraints: a4328ec8)
org.mockito:mockito-errorprone:4.5.1 (1 constraints: 0c050f36)
org.objenesis:objenesis:3.2 (3 constraints: 6b2483ae)
org.osgi:org.osgi.dto:1.0.0 (1 constraints: b40ca816)
org.osgi:org.osgi.framework:1.8.0 (1 constraints: bc0cc016)
org.osgi:org.osgi.resource:1.0.0 (1 constraints: b40ca816)
org.osgi:org.osgi.service.log:1.3.0 (1 constraints: b70cb116)
org.osgi:org.osgi.service.repository:1.1.0 (1 constraints: b50cab16)
org.osgi:org.osgi.util.function:1.2.0 (2 constraints: f2193329)
org.osgi:org.osgi.util.promise:1.2.0 (1 constraints: b60cae16)
org.osgi:org.osgi.util.tracker:1.5.4 (1 constraints: bd0cbb16)
org.osgi:osgi.annotation:8.0.1 (3 constraints: 1e2894a6)
org.ow2.asm:asm:9.3 (4 constraints: bf2f0cd9)
org.pcollections:pcollections:3.1.4 (1 constraints: f51029b8)
org.slf4j:slf4j-api:1.7.36 (7 constraints: 1e5fab5f)
org.slf4j:slf4j-api:1.7.36 (6 constraints: 2d520723)

[Test dependencies]
cglib:cglib-nodep:3.3.0 (2 constraints: 7a1acf3c)
Expand Down Expand Up @@ -124,6 +104,7 @@ jakarta.xml.bind:jakarta.xml.bind-api:3.0.0 (1 constraints: bd069059)
junit:junit-dep:4.11 (1 constraints: ba1063b3)
net.lingala.zip4j:zip4j:1.3.2 (1 constraints: 0805fb35)
one.util:streamex:0.8.1 (1 constraints: 0b050436)
org.jetbrains:annotations:19.0.0 (1 constraints: 660d8f2c)
org.jooq:jooq:3.16.6 (1 constraints: 42054d3b)
org.junit:junit-bom:5.8.2 (12 constraints: 6ac77fbf)
org.junit.jupiter:junit-jupiter:5.8.2 (2 constraints: 260e7a59)
Expand Down
1 change: 0 additions & 1 deletion versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ org.immutables:* = 2.8.8
org.ow2.asm:asm = 9.3
com.googlecode.java-diff-utils:diffutils = 1.3.0
com.puppycrawl.tools:checkstyle = 10.2
com.diffplug.gradle:goomph = 3.35.0
org.checkerframework:* = 3.22.0
com.palantir.gradle.utils:* = 0.1.0

Expand Down