-
Notifications
You must be signed in to change notification settings - Fork 46
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 #243 from RedstoneTools/dev
Update to 1.2.0
- Loading branch information
Showing
17 changed files
with
151 additions
and
115 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,54 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle | ||
# Build Workflow | ||
|
||
name: Java CI with Gradle | ||
name: Build & test | ||
|
||
on: | ||
pull_request: | ||
branches: ['main'] | ||
|
||
concurrency: | ||
group: ${{ github.head_ref || format('{0}-{1}', github.ref, github.run_number) }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 10 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'adopt' | ||
- name: Build with Gradle and run tests | ||
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1 | ||
java-version: 17 | ||
distribution: temurin | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
**/loom-cache | ||
**/prebundled-jars | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Chmod Gradle | ||
run: chmod +x ./gradlew | ||
|
||
- name: Build | ||
run: ./gradlew build --no-daemon | ||
|
||
- name: Upload Build Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
arguments: test | ||
name: dev-artifacts | ||
path: build/libs/ |
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
6 changes: 3 additions & 3 deletions
6
src/main/java/tools/redstone/redstonetools/RedstoneToolsClient.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
11 changes: 6 additions & 5 deletions
11
src/main/java/tools/redstone/redstonetools/di/FeatureModule.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 |
---|---|---|
@@ -1,17 +1,18 @@ | ||
package tools.redstone.redstonetools.di; | ||
|
||
import com.google.auto.service.AutoService; | ||
import com.google.inject.AbstractModule; | ||
import rip.hippo.inject.DoctorModule; | ||
import rip.hippo.inject.binding.Binder; | ||
import tools.redstone.redstonetools.utils.ReflectionUtils; | ||
|
||
@AutoService(AbstractModule.class) | ||
public class FeatureModule extends AbstractModule { | ||
@AutoService(DoctorModule.class) | ||
public class FeatureModule implements DoctorModule { | ||
@SuppressWarnings({"rawtypes", "unchecked"}) // this is probably the only way to make it work | ||
@Override | ||
protected void configure() { | ||
public void configure(Binder binder) { | ||
for (var feature : ReflectionUtils.getFeatures()) { | ||
Class clazz = feature.getClass(); | ||
bind(clazz).toInstance(feature); | ||
binder.bind(clazz).toInstance(feature); | ||
} | ||
} | ||
} |
23 changes: 0 additions & 23 deletions
23
src/main/java/tools/redstone/redstonetools/di/MacroModule.java
This file was deleted.
Oops, something went wrong.
31 changes: 0 additions & 31 deletions
31
src/main/java/tools/redstone/redstonetools/di/TelemetryModule.java
This file was deleted.
Oops, something went wrong.
11 changes: 6 additions & 5 deletions
11
src/main/java/tools/redstone/redstonetools/di/UtilityModule.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 |
---|---|---|
@@ -1,14 +1,15 @@ | ||
package tools.redstone.redstonetools.di; | ||
|
||
import com.google.auto.service.AutoService; | ||
import rip.hippo.inject.DoctorModule; | ||
import rip.hippo.inject.binding.Binder; | ||
import tools.redstone.redstonetools.features.feedback.AbstractFeedbackSender; | ||
import tools.redstone.redstonetools.features.feedback.FeedbackSender; | ||
import com.google.inject.AbstractModule; | ||
|
||
@AutoService(AbstractModule.class) | ||
public class UtilityModule extends AbstractModule { | ||
@AutoService(DoctorModule.class) | ||
public class UtilityModule implements DoctorModule { | ||
@Override | ||
protected void configure() { | ||
bind(AbstractFeedbackSender.class).to(FeedbackSender.class).asEagerSingleton(); | ||
public void configure(Binder binder) { | ||
binder.bind(AbstractFeedbackSender.class).to(FeedbackSender.class); | ||
} | ||
} |
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
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
Oops, something went wrong.