Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
gradle plugin depends on :spi
  • Loading branch information
iamdanfox committed Oct 22, 2019
commit ceda32a41c9ed224c0f34d4fb09364317675116d
8 changes: 4 additions & 4 deletions gradle-palantir-java-format/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ dependencies {
implementation 'com.google.guava:guava'
implementation 'gradle.plugin.org.jetbrains.gradle.plugin.idea-ext:gradle-idea-ext'
implementation project(':palantir-java-format-utils')

// it would be nicer if we could only depend on some small API and service load the 'logic', but many plumbing
// utilities are currently in this (e.g. applying Replacements, lineRangesToCharRanges etc)
implementation project(':palantir-java-format')
implementation project(':palantir-java-format-spi')

testImplementation 'com.netflix.nebula:nebula-test'
testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation 'org.junit.vintage:junit-vintage-engine'
testImplementation 'org.assertj:assertj-core'
}

gradlePlugin {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
* limitations under the License.
*/

package com.palantir.javaformat.java;
package com.palantir.javaformat.gradle;

import static java.nio.charset.StandardCharsets.UTF_8;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.assertEquals;

import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;
Expand All @@ -32,6 +31,7 @@
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;

Expand All @@ -47,7 +47,7 @@ void parsing_git_diff_output_works() throws IOException {

List<String> strings = FormatDiff.parseGitDiffOutput(example1).map(FormatDiff.SingleFileDiff::toString).collect(
Collectors.toList());
assertEquals(
Assertions.assertEquals(
ImmutableList.of(
"SingleFileDiff{path=build.gradle, lineRanges=[[24..25), [29..30)]}",
"SingleFileDiff{path=tracing/src/test/java/com/palantir/tracing/TracersTest.java, "
Expand Down
1 change: 1 addition & 0 deletions palantir-java-format-utils/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ dependencies {
testImplementation 'org.assertj:assertj-core'
testImplementation 'org.junit.jupiter:junit-jupiter-migrationsupport'
testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation 'junit:junit'
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@

package com.palantir.javaformat;

import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assert.fail;

import com.google.common.collect.ImmutableList;
import com.google.common.truth.Truth;
import java.util.Iterator;
import java.util.NoSuchElementException;
import org.junit.Assert;
import org.junit.jupiter.api.Test;

/** {@link Newlines}Test */
public class NewlinesTest {
@Test
public void offsets() {
Expand Down
7 changes: 4 additions & 3 deletions versions.lock
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ com.google.truth.extensions:truth-java8-extension:0.37 (1 constraints: ef11ffe8)
com.googlecode.java-diff-utils:diffutils:1.3.0 (1 constraints: 5c0a19b9)
com.netflix.nebula:nebula-test:7.4.0 (1 constraints: 0d051a36)
commons-io:commons-io:2.5 (1 constraints: eb0c8d0a)
junit:junit:4.12 (6 constraints: f14f0a8f)
org.apiguardian:apiguardian-api:1.1.0 (6 constraints: 18697c5a)
junit:junit:4.12 (7 constraints: 3f605391)
org.apiguardian:apiguardian-api:1.1.0 (7 constraints: 8f790357)
org.assertj:assertj-core:3.13.2 (1 constraints: 3b05403b)
org.checkerframework:checker-compat-qual:2.5.5 (1 constraints: 640a29b9)
org.hamcrest:hamcrest-core:1.3 (1 constraints: cc05fe3f)
Expand All @@ -38,7 +38,8 @@ org.junit.jupiter:junit-jupiter-engine:5.5.2 (1 constraints: 090ed63b)
org.junit.jupiter:junit-jupiter-migrationsupport:5.5.2 (1 constraints: 0e051536)
org.junit.jupiter:junit-jupiter-params:5.5.2 (1 constraints: 090ed63b)
org.junit.platform:junit-platform-commons:1.5.2 (2 constraints: d720664a)
org.junit.platform:junit-platform-engine:1.5.2 (1 constraints: a8101eb4)
org.junit.platform:junit-platform-engine:1.5.2 (2 constraints: 23213173)
org.junit.vintage:junit-vintage-engine:5.5.0 (1 constraints: 0c051336)
org.objenesis:objenesis:2.4 (1 constraints: ea0c8c0a)
org.opentest4j:opentest4j:1.2.0 (2 constraints: cd205b49)
org.spockframework:spock-core:1.3-groovy-2.4 (1 constraints: 7c10f3af)