Skip to content
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
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ build/
*.iml
bin/configlet
bin/configlet.exe
gradle/
/exercises/.nb-gradle/
16 changes: 15 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ notifications:

# http://docs.travis-ci.com/user/migrating-from-legacy
sudo: false
cache: bundler

addons:
apt:
packages:
Expand All @@ -24,9 +24,23 @@ before_install:
- rvm use 2.2.5
- bin/build-jq.sh # we want jq 1.5 features; not avail through pkg repo.

# https://docs.travis-ci.com/user/customizing-the-build#Skipping-the-Installation-Step
install: true # if we don't skip install, ./gradlew assemble is invoked, but this task is not available.

before_script:
- export PATH=$TRAVIS_BUILD_DIR/bin:$PATH # ensure our tools are prefered over included ones.

script:
- bin/unit-tests.sh
- bin/journey-test.sh

# configure caching (https://docs.travis-ci.com/user/languages/java/#Caching)
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
# format from https://docs.travis-ci.com/user/caching/#Enabling-multiple-caching-features
cache:
bundler: true
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
7 changes: 3 additions & 4 deletions bin/journey-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ clean() {
rm -rf "${build_path}"
fi
cd exercises
gradle clean
"$EXECPATH"/gradlew clean
cd ..
echo "<<< clean()"
}
Expand Down Expand Up @@ -227,12 +227,12 @@ solve_all_exercises() {

pushd ${exercism_exercises_dir}/java/${exercise}
# Check that tests compile before we strip @Ignore annotations
gradle compileTestJava
"$EXECPATH"/gradlew compileTestJava
# Ensure we run all the tests (as delivered, all but the first is @Ignore'd)
for testfile in `find . -name "*Test.java"`; do
sed 's/@Ignore\(.*\)//' ${testfile} > "${tempfile}" && mv "${tempfile}" "${testfile}"
done
gradle test
"$EXECPATH"/gradlew test
popd

current_exercise_number=$((current_exercise_number + 1))
Expand All @@ -256,7 +256,6 @@ main() {
local xapi_port=9292

# fail fast if required binaries are not installed.
assert_installed "gradle"
assert_installed "jq"

clean "${build_dir}"
Expand Down
4 changes: 2 additions & 2 deletions bin/unit-tests.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
set -e
gradle --version
./gradlew --version

echo ""
echo ">>> Running configlet..."
Expand All @@ -10,6 +10,6 @@ bin/configlet .
pushd exercises
echo ""
echo ">>> Running tests..."
TERM=dumb gradle check compileStarterSourceJava --continue
TERM=dumb ../gradlew check compileStarterSourceJava --continue
popd

Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Tue May 23 10:48:11 BST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-bin.zip
172 changes: 172 additions & 0 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

84 changes: 84 additions & 0 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.