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

Set version for gradle wrapper in build.gradle files #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
17 changes: 10 additions & 7 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ before_script:
; git reset --hard '@{upstream}'
; fi

- gradle printVersion --quiet --warning-mode fail --stacktrace
- gradle wrapper --info --warning-mode fail --stacktrace && ./gradlew -version
- ./gradlew printVersion --quiet --warning-mode fail --stacktrace

# - echo "Configure '$(realpath .m2)/repository' as default Maven local repository ..."
# - mkdir -p /root/.m2 && groovy .m2/settings.groovy > /root/.m2/settings.xml && cat /root/.m2/settings.xml
Expand Down Expand Up @@ -77,7 +78,7 @@ Assemble NETEMU:

script:
- echo "Building and installing NETEMU to Maven local repository ..."
- gradle assemble --build-cache --info --warning-mode fail --stacktrace
- ./gradlew assemble --build-cache --info --warning-mode fail --stacktrace

# - echo "Removing bundled OpenDaylight modules from Maven local repository ..."
# - rm --force --recursive .m2/repository/org/opendaylight
Expand All @@ -95,16 +96,18 @@ Test NETEMU w/TESTEMU:
- ls -x .m2/repository/

- echo "Installing NETEMU to new, empty Maven local repository ..."
- gradle publishToMavenLocal --exclude-task jar --info --warning-mode fail --stacktrace
- ./gradlew publishToMavenLocal --exclude-task jar --info --warning-mode fail --stacktrace

- echo "Showing auto-generated 'netEmuVersion' property for TESTEMU ..."
- cat testemu/gradle.properties
# - >
# export NETEMU_VERSION="$(gradle properties --quiet --stacktrace
# | grep --only-matching --perl-regexp '^version:\s*\K(\S+)')"

- echo "Testing NETEMU's API with unit tests in TESTEMU, based on YANG ietf-interfaces model ..."
- cd testemu && gradle test --build-cache --info --warning-mode all --stacktrace
- echo "Testing NETEMU's API with unit tests in TESTEMU, based on ietf-interfaces.yang model ..."
- >
cd testemu && gradle wrapper --info --warning-mode all --stacktrace && ./gradlew -version
&& ./gradlew test --build-cache --info --warning-mode all --stacktrace


Publish NETEMU to Artifactory:
Expand All @@ -115,10 +118,10 @@ Publish NETEMU to Artifactory:

script:
- >
if gradle properties --quiet --warning-mode fail --stacktrace | grep --perl-regexp '^(release|snapshot):' ; then
if ./gradlew properties --quiet --warning-mode fail --stacktrace | grep --perl-regexp '^(release|snapshot):' ; then
echo "Publishing NETEMU ..."
;
gradle publish --exclude-task jar --build-cache --info --warning-mode fail --stacktrace
./gradlew publish --exclude-task jar --build-cache --info --warning-mode fail --stacktrace
--project-prop artifactoryReleaseUrl="$ARTIFACTORY_RELEASE_URL"
--project-prop artifactorySnapshotUrl="$ARTIFACTORY_SNAPSHOT_URL"
--project-prop artifactoryUser="$ARTIFACTORY_USER"
Expand Down
6 changes: 5 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ plugins {
// id 'io.spring.dependency-management' version '1.1.0'
}

wrapper {
gradleVersion = '8.7'
}


group = "com.adva"
group = 'com.adva'

version = { com.palantir.gradle.gitversion.VersionDetails details ->

Expand Down
4 changes: 4 additions & 0 deletions testemu/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ plugins {
// id "com.github.node-gradle.node" version "2.2.3"
}

wrapper {
gradleVersion = '8.7'
}


group = "com.adva.netemu"
version = project.property 'netEmuVersion'
Expand Down