-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from ref-humbold/gradle
Gradle build
- Loading branch information
Showing
15 changed files
with
642 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# | ||
# https://help.github.com/articles/dealing-with-line-endings/ | ||
# | ||
# Linux start script should use lf | ||
/gradlew text eol=lf | ||
|
||
# These are Windows script files and should use crlf | ||
*.bat text eol=crlf | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: GitHub Actions | ||
|
||
on: [ push, pull_request ] | ||
|
||
jobs: | ||
gradle-build-and-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: APT Install Java | ||
run: | | ||
sudo apt-get update && sudo apt-get install openjdk-17-jdk | ||
sudo update-java-alternatives --set java-1.17.0-openjdk-amd64 | ||
- name: Build | ||
run: | | ||
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64 | ||
./gradlew jar | ||
- name: Test | ||
run: | | ||
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64 | ||
./gradlew test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
antBuild/ | ||
ivyLib/ | ||
|
||
.gradle | ||
build/ | ||
|
||
.vscode | ||
*.code-workspace | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
plugins { | ||
id 'java-library' | ||
} | ||
|
||
ext { | ||
majorVersion = 4 | ||
minorVersion = 0 | ||
dateVersion = new Date().format('yyMMdd') | ||
specVersion = "${majorVersion}.${minorVersion}" | ||
jarVersion = "${majorVersion}.${minorVersion}.${dateVersion}" | ||
vendor = 'Rafał Kaleta' | ||
mainPackage = 'dicontainer' | ||
} | ||
|
||
version = project.jarVersion | ||
archivesBaseName = project.mainPackage | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
testImplementation 'org.junit.jupiter:junit-jupiter:5.+' | ||
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.+' | ||
testImplementation 'org.junit.platform:junit-platform-commons:1.+' | ||
testImplementation 'org.junit.platform:junit-platform-engine:1.+' | ||
testImplementation 'org.junit.platform:junit-platform-launcher:1.+' | ||
testImplementation 'org.assertj:assertj-core:3.+' | ||
} | ||
|
||
tasks.jar { | ||
manifest { | ||
attributes( | ||
'Built-By': project.vendor, | ||
'Specification-Title': 'Dependency Injection Container', | ||
'Specification-Version': project.specVersion, | ||
'Specification-Vendor': project.vendor, | ||
'Implementation-Title': project.mainPackage, | ||
'Implementation-Version': project.jarVersion, | ||
'Implementation-Vendor': project.vendor | ||
) | ||
} | ||
} | ||
|
||
tasks.test { | ||
useJUnitPlatform() | ||
} | ||
|
||
task rebuild { | ||
group 'build' | ||
description 'Deletes the build directory, assembles and tests this project.' | ||
dependsOn 'clean', 'build' | ||
tasks.findByName('build').mustRunAfter('clean') | ||
} | ||
|
||
javadoc.options.addStringOption('Xdoclint:none') |
Oops, something went wrong.