Skip to content

Commit 737e4c7

Browse files
committed
Merge branch 'master' of github.com:APN-Pucky/GitJarUpdate
2 parents b875854 + d857661 commit 737e4c7

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

README.md

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# GitJarUpdate
2+
Presents a popup at the start of a program when there is a new Github Release. Then restarts the updated program.
3+
## Usage
4+
build.gradle
5+
6+
```gradle
7+
plugins {
8+
// get git infos into Manifest
9+
id 'com.palantir.git-version' version '0.12.3'
10+
}
11+
repositories {
12+
//load repo from git via gradle
13+
maven { url "https://jitpack.io" }
14+
}
15+
dependencies {
16+
implementation 'com.github.APN-Pucky:GitJarUpdate:0.0.3'
17+
}
18+
19+
task fatJar(type: Jar) {
20+
manifest {
21+
attributes 'Implementation-Title': project.name,
22+
'Implementation-Version': versionDetails().lastTag,
23+
'Main-Class': 'YOUR.MAIN.CLASS.HERE'
24+
}
25+
baseName = project.name + '-all'
26+
from {
27+
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }{
28+
//disable signing from 3rd party
29+
exclude 'META-INF/*.RSA', 'META-INF/*.SF', 'META-INF/*.DSA'
30+
}
31+
with jar
32+
}
33+
```
34+
At the start of your program run:
35+
```java
36+
Update.loadUpdate("PROJECTNAME-all.jar", "GITHUBUSER", "GITHUBPROJECTNAME");
37+
```
38+
39+
An example with github actions publishing jar files is ![TeXCalc](https://github.com/APN-Pucky/TeXCalc).
40+
41+
## Note
42+
The Git/Manifest info is not (correctly) included if the code is run from an IDE instead of a built jar. Therefore an Update-Popup will show.

0 commit comments

Comments
 (0)