-
Notifications
You must be signed in to change notification settings - Fork 12
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 #126 from Picono435/development
Update to 1.0-beta-4
- Loading branch information
Showing
217 changed files
with
9,720 additions
and
845 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
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,10 @@ | ||
version = 1 | ||
|
||
test_patterns = ["**/test**"] | ||
|
||
[[analyzers]] | ||
name = "java" | ||
enabled = true | ||
|
||
[analyzers.meta] | ||
runtime_version = "11" |
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,44 @@ | ||
# This workflow will build a Java project with Gradle | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | ||
|
||
name: Java CI with Gradle | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build-8: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Build with Gradle | ||
run: ./gradlew slimjar:build | ||
- name: Run tests | ||
run: ./gradlew test | ||
build-11: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 1.11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.11 | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Build with Gradle | ||
run: ./gradlew slimjar:build | ||
- name: Run tests | ||
run: ./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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Project exclude paths | ||
/.gradle/ | ||
.idea/ | ||
|
||
build/ | ||
|
||
gradle-plugin/build/ | ||
|
||
slimjar/build/ | ||
|
||
loader-agent/build/ | ||
|
||
gradle.properties |
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 @@ | ||
MIT License | ||
|
||
Copyright (c) 2021 Vaishnav Anil | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,87 @@ | ||
<h1 align="center">Slim Jar</h1> | ||
<h3 align="center">Runtime Dependency Management</h3> | ||
<div align="center"> | ||
<a href="https://github.com/SlimJar/slimjar/"> | ||
<img src="https://img.shields.io/github/license/SlimJar/slimjar"> | ||
</a> | ||
<a href="https://github.com/SlimJar/slimjar/actions/workflows/gradle.yml"> | ||
<img src="https://github.com/SlimJar/slimjar/actions/workflows/gradle.yml/badge.svg"> | ||
</a> | ||
<a href="https://plugins.gradle.org/plugin/io.github.slimjar"> | ||
<img src="https://img.shields.io/maven-metadata/v.svg?label=gradle-plugin&metadataUrl=https%3A%2F%2Fplugins.gradle.org%2Fm2%2Fio%2Fgithub%2Fslimjar%2Fio.github.slimjar.gradle.plugin%2Fmaven-metadata.xml"> | ||
</a> | ||
<a href="https://repo.vshnv.tech/releases/io/github/slimjar/slimjar"> | ||
<img src="https://img.shields.io/maven-metadata/v.svg?label=maven&metadataUrl=https%3A%2F%2Frepo.vshnv.tech%2Fio%2Fgithub%2Fslimjar%2Fslimjar%2Fmaven-metadata.xml"> | ||
</a> | ||
</div> | ||
|
||
<hr> | ||
|
||
<h4>What is SlimJar?</h4> | ||
|
||
SlimJar allows you to download and load up dependencies at runtime as an alternative to shading your dependencies. This helps you reduce build output size and share downloaded dependencies between projects at client side. It is built mainly with the gradle eco-system in mind and is easily configurable being an almost a drop-in replacement/add-on to gradle projects. | ||
|
||
<h4>Why use SlimJar?</h4> | ||
|
||
SlimJar makes the process of switching out jars easier by providing jars that are much lesser in size, all "slimmed" dependencies are already available and do not need to be explicitly moved back to your working directory during an update or change. This can be extremely useful for users who have lower bandwidth connections to push large updates to production or testing environments. It also provides vital features such as package relocation, module isolation, auto configuration generation...etc with the simplicity of minor tweaks in your build file. | ||
|
||
<hr> | ||
|
||
<h2 align="center">Usage Example</h2> | ||
<h4 align="center">Note: Use the shadowJar task to compile your project</h4> | ||
<br><br> | ||
|
||
|
||
```java | ||
// this needs to be ran before you reference your dependencies | ||
ApplicationBuilder.appending("MyApplicationName").build() | ||
``` | ||
(NOTE: If you have specified relocations and are running in a IDE or any environment that does not use the shadowjar-ed build file, use the `ignoreRelocation` flag while running by using `-DignoreRelocation` in your runner arguments) | ||
*build.gradle* GROOVY DSL | ||
```groovy | ||
plugins { | ||
id 'com.github.johnrengelman.shadow' version '6.0.0' | ||
id 'io.github.slimjar' version '1.3.0' | ||
} | ||
dependencies { | ||
implementation slimjar("1.2.6") | ||
slim 'group.id:artifact.id:version' | ||
} | ||
slimJar { | ||
relocate 'a.b.c', 'm.n.o' | ||
} | ||
``` | ||
|
||
(For Kotlin DSL, to use the `slimjar` extension in dependencies block, you will need the following import - `import io.github.slimjar.func.slimjar`) | ||
|
||
<br> | ||
<br> | ||
<h2 align="center">Development setup</h2> | ||
|
||
|
||
```sh | ||
git clone https://github.com/SlimJar/slimjar.git | ||
gradlew test | ||
``` | ||
<br> | ||
<br> | ||
<h2 align="center">Releases</h2> | ||
|
||
* https://plugins.gradle.org/plugin/io.github.slimjar | ||
* https://repo.vshnv.tech/releases/io/github/slimjar/slimjar/1.2.1 | ||
|
||
Distributed under the MIT license. See ``LICENSE`` for more information. | ||
|
||
<br> | ||
<br> | ||
<h2 align="center">Contributing</h2> | ||
|
||
|
||
|
||
1. Fork it (<https://github.com/SlimJar/slimjar/fork>) | ||
2. Create your feature branch (`git checkout -b feature/abcd`) | ||
3. Commit your changes (`git commit -am 'Added some feature abcd'`) | ||
4. Push to the branch (`git push origin feature/fooBar`) | ||
5. Create a new Pull Request | ||
|
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,30 @@ | ||
plugins { | ||
id 'java' | ||
id 'com.github.hierynomus.license-base' version '0.15.0' | ||
} | ||
|
||
allprojects { | ||
group 'io.github.slimjar' | ||
|
||
apply plugin: 'com.github.hierynomus.license-base' | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
license { | ||
header rootProject.file('LICENSE') | ||
includes(['**/*.java', '**/*.kt']) | ||
mapping 'kt': 'DOUBLESLASH_STYLE', | ||
'java': 'DOUBLESLASH_STYLE' | ||
} | ||
} | ||
|
||
dependencies { | ||
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0' | ||
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine' | ||
} | ||
|
||
test { | ||
useJUnitPlatform() | ||
} |
Oops, something went wrong.