Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
Locking JGit dep below 6.0 for now.
  • Loading branch information
ajoberstar committed Nov 30, 2021
1 parent 5d79690 commit 0da1430
Show file tree
Hide file tree
Showing 20 changed files with 145 additions and 82 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: Build
on:
push:
branches:
- main
branches: [main]
pull_request:
jobs:
check:
Expand All @@ -12,27 +11,28 @@ jobs:
java: [8, 11, 15]
fail-fast: false
steps:
- name: "Checkout repo"
uses: "actions/checkout@v2"
- name: Checkout repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: "Setup Java ${{ matrix.java }}"
uses: "actions/setup-java@v1"
- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v2
with:
distribution: zulu
java-version: ${{ matrix.java }}
- name: "Validate Gradle Wrapper"
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: "Cache Gradle wrapper"
uses: "actions/cache@v2"
- name: Cache Gradle wrapper
uses: actions/cache@v2
with:
path: |
~/.gradle/wrapper
~/.gradle/notifications
key: "gradle-wrapper-${{ runner.os }}-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}"
- name: "Cache Gradle dependencies"
uses: "actions/cache@v2"
key: gradle-wrapper-${{ runner.os }}-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
- name: Cache Gradle dependencies
uses: actions/cache@v2
with:
path: "~/.gradle/caches"
key: "gradle-caches-${{ runner.os }}-${{ hashFiles('**/gradle/dependency-locks/*.lockfile') }}"
- name: "Gradle check"
run: "./gradlew check --continue"
path: ~/.gradle/caches
key: gradle-caches-${{ runner.os }}-${{ hashFiles('**/gradle/dependency-locks/*.lockfile') }}
- name: Gradle check
run: ./gradlew check --continue
4 changes: 2 additions & 2 deletions grgit-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ dependencies {
compileOnly("org.codehaus.groovy:groovy:[2.5.0, 2.6.0-alpha)")

// jgit
api("org.eclipse.jgit:org.eclipse.jgit:latest.release")
api("org.eclipse.jgit:org.eclipse.jgit:[5.9, 6.0)")

// logging
testImplementation("org.slf4j:slf4j-api:latest.release")
testRuntime("org.slf4j:slf4j-simple:latest.release")

// testing
testImplementation("junit:junit:latest.release")
testImplementation("org.spockframework:spock-core:1.3-groovy-2.5")
testImplementation("org.spockframework:spock-core:2.0-groovy-2.5")

constraints {
testImplementation("org.codehaus.groovy:groovy:2.5.10") {
Expand Down
8 changes: 4 additions & 4 deletions grgit-core/gradle/dependency-locks/compileClasspath.lockfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
com.googlecode.javaewah:JavaEWAH:1.1.7
org.codehaus.groovy:groovy:2.5.13
org.eclipse.jgit:org.eclipse.jgit:5.9.0.202009080501-r
org.slf4j:slf4j-api:1.7.2
com.googlecode.javaewah:JavaEWAH:1.1.12
org.codehaus.groovy:groovy:2.5.15
org.eclipse.jgit:org.eclipse.jgit:5.13.0.202109080827-r
org.slf4j:slf4j-api:1.7.30
6 changes: 3 additions & 3 deletions grgit-core/gradle/dependency-locks/runtimeClasspath.lockfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
com.googlecode.javaewah:JavaEWAH:1.1.7
org.eclipse.jgit:org.eclipse.jgit:5.9.0.202009080501-r
org.slf4j:slf4j-api:1.7.2
com.googlecode.javaewah:JavaEWAH:1.1.12
org.eclipse.jgit:org.eclipse.jgit:5.13.0.202109080827-r
org.slf4j:slf4j-api:1.7.30
34 changes: 21 additions & 13 deletions grgit-core/gradle/dependency-locks/testCompileClasspath.lockfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
com.googlecode.javaewah:JavaEWAH:1.1.7
junit:junit:4.13
org.codehaus.groovy:groovy-json:2.5.4
org.codehaus.groovy:groovy-macro:2.5.4
org.codehaus.groovy:groovy-nio:2.5.4
org.codehaus.groovy:groovy-sql:2.5.4
org.codehaus.groovy:groovy-templates:2.5.4
org.codehaus.groovy:groovy-test:2.5.4
org.codehaus.groovy:groovy-xml:2.5.4
org.codehaus.groovy:groovy:2.5.10
org.eclipse.jgit:org.eclipse.jgit:5.9.0.202009080501-r
cglib:cglib-nodep:3.3.0
com.googlecode.javaewah:JavaEWAH:1.1.12
junit:junit:4.13.2
net.bytebuddy:byte-buddy:1.11.0
org.apiguardian:apiguardian-api:1.1.0
org.assertj:assertj-core:3.16.1
org.codehaus.groovy:groovy:2.5.14
org.eclipse.jgit:org.eclipse.jgit:5.13.0.202109080827-r
org.hamcrest:hamcrest-core:1.3
org.slf4j:slf4j-api:2.0.0-alpha1
org.spockframework:spock-core:1.3-groovy-2.5
org.hamcrest:hamcrest:2.2
org.jetbrains:annotations:20.1.0
org.junit.platform:junit-platform-commons:1.7.2
org.junit.platform:junit-platform-engine:1.7.2
org.junit.platform:junit-platform-launcher:1.7.2
org.junit.platform:junit-platform-testkit:1.7.2
org.junit:junit-bom:5.7.2
org.objenesis:objenesis:3.2
org.opentest4j:opentest4j:1.2.0
org.ow2.asm:asm:9.1
org.slf4j:slf4j-api:2.0.0-alpha5
org.spockframework:spock-core:2.0-groovy-2.5
org.spockframework:spock-groovy2-compat:2.0-groovy-2.5
36 changes: 22 additions & 14 deletions grgit-core/gradle/dependency-locks/testRuntimeClasspath.lockfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
com.googlecode.javaewah:JavaEWAH:1.1.7
junit:junit:4.13
org.codehaus.groovy:groovy-json:2.5.4
org.codehaus.groovy:groovy-macro:2.5.4
org.codehaus.groovy:groovy-nio:2.5.4
org.codehaus.groovy:groovy-sql:2.5.4
org.codehaus.groovy:groovy-templates:2.5.4
org.codehaus.groovy:groovy-test:2.5.4
org.codehaus.groovy:groovy-xml:2.5.4
org.codehaus.groovy:groovy:2.5.10
org.eclipse.jgit:org.eclipse.jgit:5.9.0.202009080501-r
cglib:cglib-nodep:3.3.0
com.googlecode.javaewah:JavaEWAH:1.1.12
junit:junit:4.13.2
net.bytebuddy:byte-buddy:1.11.0
org.apiguardian:apiguardian-api:1.1.0
org.assertj:assertj-core:3.16.1
org.codehaus.groovy:groovy:2.5.14
org.eclipse.jgit:org.eclipse.jgit:5.13.0.202109080827-r
org.hamcrest:hamcrest-core:1.3
org.slf4j:slf4j-api:2.0.0-alpha1
org.slf4j:slf4j-simple:2.0.0-alpha1
org.spockframework:spock-core:1.3-groovy-2.5
org.hamcrest:hamcrest:2.2
org.jetbrains:annotations:20.1.0
org.junit.platform:junit-platform-commons:1.7.2
org.junit.platform:junit-platform-engine:1.7.2
org.junit.platform:junit-platform-launcher:1.7.2
org.junit.platform:junit-platform-testkit:1.7.2
org.junit:junit-bom:5.7.2
org.objenesis:objenesis:3.2
org.opentest4j:opentest4j:1.2.0
org.ow2.asm:asm:9.1
org.slf4j:slf4j-api:2.0.0-alpha5
org.slf4j:slf4j-simple:2.0.0-alpha5
org.spockframework:spock-core:2.0-groovy-2.5
org.spockframework:spock-groovy2-compat:2.0-groovy-2.5
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class CloneOp implements Callable<Grgit> {
cmd.bare = bare
cmd.noCheckout = !checkout
if (refToCheckout) { cmd.branch = refToCheckout }
if (all) cmd.cloneAllBranches = all
if (all) { cmd.cloneAllBranches = all }
if (!branches.isEmpty()) cmd.branchesToClone = branches

Git jgit = cmd.call()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ class MultiGitOpSpec extends Specification {

protected Grgit init(String name) {
File repoDir = tempDir.newFolder(name).canonicalFile
Git git = Git.init().setDirectory(repoDir).call()
Git git = Git.init()
.setDirectory(repoDir)
.setInitialBranch('master') // for compatibility with existing tests
.call()

// Don't want the user's git config to conflict with test expectations
git.repo.FS.userHome = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ class SimpleGitOpSpec extends Specification {

def setup() {
File repoDir = tempDir.newFolder('repo')
Git git = Git.init().setDirectory(repoDir).call()
Git git = Git.init()
.setDirectory(repoDir)
.setInitialBranch('master') // for compatibility with existing tests
.call()

// Don't want the user's git config to conflict with test expectations
git.repo.FS.userHome = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ class ApplyOpSpec extends SimpleGitOpSpec {
when:
grgit.apply(patch: patch)
then:
repoFile('1.txt').text == 'something'
repoFile('2.txt').text == 'something else\nis being added\n'
repoFile('3.txt').text == 'some new stuff\n'
repoFile('1.txt').text.normalize() == 'something'
repoFile('2.txt').text.normalize() == 'something else\nis being added\n'
repoFile('3.txt').text.normalize() == 'some new stuff\n'
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ class BranchStatusOpSpec extends MultiGitOpSpec {

remoteGrgit.checkout(branch: 'master')
remoteGrgit.checkout(branch: 'out-of-date', createBranch: true)
remoteGrgit.checkout(branch: 'master')

localGrgit = clone('local', remoteGrgit)

localGrgit.branch.add(name: 'up-to-date', startPoint: 'origin/up-to-date')
localGrgit.branch.add(name: 'out-of-date', startPoint: 'origin/out-of-date')
localGrgit.checkout(branch: 'out-of-date')

remoteGrgit.checkout(branch: 'out-of-date')
repoFile(remoteGrgit, '1.txt') << '3'
remoteGrgit.commit(message: 'do', all: true)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ class PullOpSpec extends MultiGitOpSpec {
includes = ['HEAD']
excludes = [localHead.id, remoteHead.id]
}.size() == 1

// has state of all changes
repoFile(localGrgit, '1.txt').text.normalize() == '1.1\n1.2\n1.3\n'
repoFile(localGrgit, '3.txt').text.normalize() == '3.1\n'
}

def 'pull to local repo with conflicting changes fails'() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,17 @@ class JGitUtilSpec extends Specification {

def setup() {
File repoDir = tempDir.newFolder('repo')
Git git = Git.init().setDirectory(repoDir).call()
Git git = Git.init()
.setDirectory(repoDir)
.setInitialBranch('master') // for compatibility with existing tests
.call()

git.repo.config.with {
setString('user', null, 'name', 'Bruce Wayne')
setString('user', null, 'email', 'bruce.wayne@wayneindustries.com')
save()
}

File testFile = new File(repoDir, '1.txt')
testFile << '1\n'
git.add().addFilepattern(testFile.name).call()
Expand Down
2 changes: 1 addition & 1 deletion grgit-gradle/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dependencies {
compatTestImplementation(project(":grgit-core"))

compatTestCompile("junit:junit:latest.release")
compatTestCompile("org.spockframework:spock-core:1.3-groovy-2.5")
compatTestCompile("org.spockframework:spock-core:2.0-groovy-2.5")
}

tasks.named<Jar>("jar") {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
com.googlecode.javaewah:JavaEWAH:1.1.7
junit:junit:4.13
org.eclipse.jgit:org.eclipse.jgit:5.9.0.202009080501-r
cglib:cglib-nodep:3.3.0
com.googlecode.javaewah:JavaEWAH:1.1.12
junit:junit:4.13.2
net.bytebuddy:byte-buddy:1.11.0
org.apiguardian:apiguardian-api:1.1.0
org.assertj:assertj-core:3.16.1
org.eclipse.jgit:org.eclipse.jgit:5.13.0.202109080827-r
org.hamcrest:hamcrest-core:1.3
org.slf4j:slf4j-api:1.7.2
org.spockframework:spock-core:1.3-groovy-2.5
org.hamcrest:hamcrest:2.2
org.jetbrains:annotations:20.1.0
org.junit.platform:junit-platform-commons:1.7.2
org.junit.platform:junit-platform-engine:1.7.2
org.junit.platform:junit-platform-launcher:1.7.2
org.junit.platform:junit-platform-testkit:1.7.2
org.junit:junit-bom:5.7.2
org.objenesis:objenesis:3.2
org.opentest4j:opentest4j:1.2.0
org.ow2.asm:asm:9.1
org.slf4j:slf4j-api:1.7.30
org.spockframework:spock-core:2.0-groovy-2.5
org.spockframework:spock-groovy2-compat:2.0-groovy-2.5
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
com.googlecode.javaewah:JavaEWAH:1.1.7
junit:junit:4.13
org.eclipse.jgit:org.eclipse.jgit:5.9.0.202009080501-r
cglib:cglib-nodep:3.3.0
com.googlecode.javaewah:JavaEWAH:1.1.12
junit:junit:4.13.2
net.bytebuddy:byte-buddy:1.11.0
org.apiguardian:apiguardian-api:1.1.0
org.assertj:assertj-core:3.16.1
org.eclipse.jgit:org.eclipse.jgit:5.13.0.202109080827-r
org.hamcrest:hamcrest-core:1.3
org.slf4j:slf4j-api:1.7.2
org.spockframework:spock-core:1.3-groovy-2.5
org.hamcrest:hamcrest:2.2
org.jetbrains:annotations:20.1.0
org.junit.platform:junit-platform-commons:1.7.2
org.junit.platform:junit-platform-engine:1.7.2
org.junit.platform:junit-platform-launcher:1.7.2
org.junit.platform:junit-platform-testkit:1.7.2
org.junit:junit-bom:5.7.2
org.objenesis:objenesis:3.2
org.opentest4j:opentest4j:1.2.0
org.ow2.asm:asm:9.1
org.slf4j:slf4j-api:1.7.30
org.spockframework:spock-core:2.0-groovy-2.5
org.spockframework:spock-groovy2-compat:2.0-groovy-2.5
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
com.googlecode.javaewah:JavaEWAH:1.1.7
org.eclipse.jgit:org.eclipse.jgit:5.9.0.202009080501-r
org.slf4j:slf4j-api:1.7.2
com.googlecode.javaewah:JavaEWAH:1.1.12
org.eclipse.jgit:org.eclipse.jgit:5.13.0.202109080827-r
org.slf4j:slf4j-api:1.7.30
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
com.googlecode.javaewah:JavaEWAH:1.1.7
org.eclipse.jgit:org.eclipse.jgit:5.9.0.202009080501-r
org.slf4j:slf4j-api:1.7.2
com.googlecode.javaewah:JavaEWAH:1.1.12
org.eclipse.jgit:org.eclipse.jgit:5.13.0.202109080827-r
org.slf4j:slf4j-api:1.7.30
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
com.googlecode.javaewah:JavaEWAH:1.1.7
org.eclipse.jgit:org.eclipse.jgit:5.9.0.202009080501-r
org.slf4j:slf4j-api:1.7.2
com.googlecode.javaewah:JavaEWAH:1.1.12
org.eclipse.jgit:org.eclipse.jgit:5.13.0.202109080827-r
org.slf4j:slf4j-api:1.7.30
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
com.googlecode.javaewah:JavaEWAH:1.1.7
org.eclipse.jgit:org.eclipse.jgit:5.9.0.202009080501-r
org.slf4j:slf4j-api:1.7.2
com.googlecode.javaewah:JavaEWAH:1.1.12
org.eclipse.jgit:org.eclipse.jgit:5.13.0.202109080827-r
org.slf4j:slf4j-api:1.7.30

0 comments on commit 0da1430

Please sign in to comment.