File tree 1 file changed +42
-0
lines changed
1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change
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.
You can’t perform that action at this time.
0 commit comments