v0.8.2: added a news checker service

This commit is contained in:
Evan Debenham
2020-07-03 19:17:54 -04:00
parent d406230821
commit 94809385d4
14 changed files with 437 additions and 2 deletions

View File

@@ -23,6 +23,7 @@ task debug(dependsOn: classes, type: JavaExec) {
dependencies {
debugImplementation project(':services:updates:debugUpdates')
debugImplementation project(':services:news:debugNews')
}
}
@@ -45,6 +46,7 @@ task release(dependsOn: compileForRelease, type: Jar) {
dependencies {
releaseImplementation project(':services:updates:githubUpdates')
releaseImplementation project(':services:news:shatteredNews')
}
}
@@ -65,4 +67,5 @@ dependencies {
//Need these at compile time to prevent errors there.
// The actual dependency used at runtime will vary based on source set.
compileOnly project(':services:updates:debugUpdates')
compileOnly project(':services:news:debugNews')
}

View File

@@ -31,6 +31,8 @@ import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.utils.SharedLibraryLoader;
import com.shatteredpixel.shatteredpixeldungeon.SPDSettings;
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
import com.shatteredpixel.shatteredpixeldungeon.services.news.News;
import com.shatteredpixel.shatteredpixeldungeon.services.news.NewsImpl;
import com.shatteredpixel.shatteredpixeldungeon.services.updates.UpdateImpl;
import com.shatteredpixel.shatteredpixeldungeon.services.updates.Updates;
import com.watabou.noosa.Game;
@@ -98,6 +100,9 @@ public class DesktopLauncher {
if (UpdateImpl.supportsUpdates()){
Updates.service = UpdateImpl.getUpdateService();
}
if (NewsImpl.supportsNews()){
News.service = NewsImpl.getNewsService();
}
Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration();