forked from guillaume009/runelite-plugin-action-progress
-
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.
- Loading branch information
caleb
committed
Apr 18, 2022
1 parent
08afa50
commit dc1207d
Showing
58 changed files
with
9,784 additions
and
1,322 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,36 +1,38 @@ | ||
//file:noinspection GroovyUnusedAssignment | ||
//file:noinspection GrUnresolvedAccess | ||
plugins { | ||
id 'java' | ||
id 'java' | ||
} | ||
|
||
repositories { | ||
mavenLocal() | ||
maven { | ||
url = 'https://repo.runelite.net' | ||
} | ||
mavenCentral() | ||
mavenLocal() | ||
maven { | ||
url = 'https://repo.runelite.net' | ||
} | ||
mavenCentral() | ||
} | ||
|
||
def runeLiteVersion = '1.8.15' | ||
def runeLiteVersion = '1.8.17' | ||
|
||
dependencies { | ||
compileOnly group: 'net.runelite', name:'client', version: runeLiteVersion | ||
compileOnly 'org.jetbrains:annotations:23.0.0' | ||
compileOnly group: 'net.runelite', name: 'client', version: runeLiteVersion | ||
|
||
compileOnly 'org.projectlombok:lombok:1.18.4' | ||
annotationProcessor 'org.projectlombok:lombok:1.18.4' | ||
compileOnly 'org.projectlombok:lombok:1.18.22' | ||
annotationProcessor 'org.projectlombok:lombok:1.18.4' | ||
|
||
testImplementation 'junit:junit:4.12' | ||
testImplementation 'org.slf4j:slf4j-simple:1.7.12' | ||
testImplementation group: 'net.runelite', name:'client', version: runeLiteVersion, { | ||
exclude group: 'ch.qos.logback', module: 'logback-classic' | ||
} | ||
testImplementation 'junit:junit:4.13.2' | ||
testImplementation 'org.slf4j:slf4j-simple:1.7.36' | ||
|
||
testImplementation group: 'net.runelite', name: 'client', version: runeLiteVersion, { | ||
exclude group: 'ch.qos.logback', module: 'logback-classic' | ||
} | ||
} | ||
|
||
group = 'uk.calebwhiting' | ||
version = '1.02' | ||
version = '1.03-SNAPSHOT' | ||
sourceCompatibility = '1.8' | ||
|
||
tasks.withType(JavaCompile) { | ||
options.encoding = 'UTF-8' | ||
options.encoding = 'UTF-8' | ||
} |
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,2 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<module type="JAVA_MODULE" version="4" /> |
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
18 changes: 18 additions & 0 deletions
18
src/main/java/com/github/calebwhiting/runelite/api/LazyInitializer.java
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,18 @@ | ||
package com.github.calebwhiting.runelite.api; | ||
|
||
public abstract class LazyInitializer<T> { | ||
|
||
private boolean initialized = false; | ||
private T value; | ||
|
||
public T get() { | ||
if (!initialized) { | ||
this.value = this.create(); | ||
this.initialized = true; | ||
} | ||
return this.value; | ||
} | ||
|
||
protected abstract T create(); | ||
|
||
} |
Oops, something went wrong.