Skip to content

Commit 8688ec0

Browse files
committed
doing some gradle stuff
1 parent 90f82bc commit 8688ec0

File tree

6 files changed

+74
-17
lines changed

6 files changed

+74
-17
lines changed

.github/workflows/gradle.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ jobs:
2222

2323
steps:
2424
- uses: actions/checkout@v4
25-
- name: Set up JDK 17
25+
- name: Set up JDK 21
2626
uses: actions/setup-java@v4
2727
with:
28-
java-version: '17'
29-
distribution: 'temurin'
28+
java-version: '21'
29+
distribution: 'OpenJDK'
3030

3131
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
3232
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
@@ -55,11 +55,11 @@ jobs:
5555

5656
steps:
5757
- uses: actions/checkout@v4
58-
- name: Set up JDK 17
58+
- name: Set up JDK 21
5959
uses: actions/setup-java@v4
6060
with:
61-
java-version: '17'
62-
distribution: 'temurin'
61+
java-version: '21'
62+
distribution: 'OpenJDK'
6363

6464
# Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies.
6565
# See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md

README.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,32 @@
1-
placeholder
1+
# ![bedrockR](https://raw.githubusercontent.com/xFN10x/bedrockR/refs/heads/master/app/src/main/resources/ui/BrandingFullWShadow.png)
2+
3+
A Minecraft Bedrock GUI-Based Addon maker, for Windows, Linux, and Chromebook.
4+
5+
## Why?
6+
7+
Minecraft bedrock Addons are experimental, and very hard to create compared to Java mods. With this tool, you will be able to create addons, that fully showcase MCPEs addon capibilitys, and unlike other tools, like MCreator, This will be updated along side Minecraft, and it will let you *live* test your mods, using Minecrafts built-in tools.
8+
9+
## Source Code
10+
11+
This app was made with Visual Studio Code, and it is fully setup to be used with it.
12+
13+
### Debugging/Contributing
14+
15+
It is reccomened to use Visual Studio code to make edits. Here are the extension I reccomend:
16+
17+
- [Debugger for Java](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-debug)
18+
- [Extension Pack for Java](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-pack)
19+
- [Gradle for Java](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-gradle)
20+
- [Project Manager for Java](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-dependency), and
21+
- [Language Support for Java](https://marketplace.visualstudio.com/items?itemName=redhat.java)
22+
23+
If you can, use this for building when convenient.
24+
25+
### Building
26+
27+
28+
29+
30+
31+
32+

app/build.gradle

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@
55
* For more details on building Java & JVM projects, please refer to https://docs.gradle.org/8.8/userguide/building_java_projects.html in the Gradle documentation.
66
*/
77

8+
89

910

1011
plugins {
1112
// Apply the application plugin to add support for building a CLI application in Java.
1213
id 'application'
14+
id 'java'
15+
id("com.gradleup.shadow") version "9.0.0-beta17"
1316
}
1417

1518
repositories {
@@ -27,6 +30,7 @@ sourceSets {
2730
}
2831

2932

33+
3034
dependencies {
3135
// Use JUnit Jupiter for testing.
3236
testImplementation libs.junit.jupiter
@@ -40,6 +44,8 @@ dependencies {
4044
implementation 'com.google.code.gson:gson:2.13.1'
4145
//flat laf
4246
implementation 'com.formdev:flatlaf:3.6'
47+
48+
implementation("com.gradleup.shadow:com.gradleup.shadow.gradle.plugin:9.0.0-beta17")
4349
}
4450

4551
// Apply a specific Java toolchain to ease working on different environments.
@@ -58,3 +64,12 @@ tasks.named('test') {
5864
// Use JUnit Platform for unit tests.
5965
useJUnitPlatform()
6066
}
67+
68+
def version = 'a1.0'
69+
70+
tasks.named('shadowJar', com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) {
71+
archiveBaseName = 'bedrockR'
72+
archiveVersion = version
73+
destinationDirectory =
74+
}
75+

app/src/main/java/fn10/bedrockr/windows/componets/RElementValue.java

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
import javax.annotation.Nullable;
55
import javax.swing.*;
66
import java.awt.*;
7+
import java.awt.event.ActionEvent;
8+
import java.awt.event.ActionListener;
79
import java.awt.event.ItemEvent;
810
import java.awt.event.ItemListener;
911
import java.lang.reflect.Type;
@@ -18,23 +20,21 @@ public class RElementValue extends JPanel {
1820
private Component Input;
1921
private JCheckBox EnableDis = new JCheckBox();
2022

21-
private final static Dimension Size = new Dimension(335, 40);
23+
private final static Dimension Size = new Dimension(350, 40);
2224
private String Target = "";
2325

2426
public RElementValue(@Nonnull Type InputType, String TargetField, String DisplayName, Boolean Optional,
2527
@Nullable String HelpString) {
2628
super();
2729

2830
this.Target = TargetField;
29-
31+
3032
setMaximumSize(Size);
3133
setPreferredSize(Size);
3234
setBorder(new LineBorder(Color.DARK_GRAY));
3335
setLayout(Lay);
3436

35-
Help.setSize(6, 6);
36-
Help.putClientProperty("JButton.buttonType", "help" );
37-
//Help.setBorder(new FlatLineBorder(new Insets(3, 3, 3, 3), Color.white, 1, 32));
37+
Help.putClientProperty("JButton.buttonType", "help");
3838

3939
Launcher.LOG.info(InputType.getTypeName());
4040
if (InputType.equals(Boolean.class)) {
@@ -51,12 +51,23 @@ public void itemStateChanged(ItemEvent e) {
5151
EnableDis.setEnabled(e.getStateChange() == e.SELECTED ? true : false);
5252
}
5353

54+
});
55+
Help.addActionListener(new ActionListener() {
56+
57+
@Override
58+
public void actionPerformed(ActionEvent e) {
59+
60+
}
61+
5462
});
5563

5664
Name.setText(DisplayName);
5765

5866
Lay.putConstraint(SpringLayout.VERTICAL_CENTER, Name, 0, SpringLayout.VERTICAL_CENTER, this);
59-
Lay.putConstraint(SpringLayout.WEST, Name, 13, SpringLayout.WEST, this);
67+
Lay.putConstraint(SpringLayout.WEST, Name, 6, SpringLayout.EAST, Help);
68+
69+
Lay.putConstraint(SpringLayout.VERTICAL_CENTER, Help, 0, SpringLayout.VERTICAL_CENTER, this);
70+
Lay.putConstraint(SpringLayout.WEST, Help, 0, SpringLayout.WEST, this);
6071

6172
Lay.putConstraint(SpringLayout.WEST, Input, 3, SpringLayout.EAST, Name);
6273
Lay.putConstraint(SpringLayout.NORTH, Input, 3, SpringLayout.NORTH, this);
@@ -68,15 +79,14 @@ public void itemStateChanged(ItemEvent e) {
6879

6980
if (!Optional) {
7081
EnableDis.setEnabled(false);
71-
}
82+
}
7283

7384
Launcher.LOG.info(Input.toString());
74-
add(Help);
85+
7586
add(Name);
7687
add(Input);
7788
add(EnableDis);
89+
add(Help);
7890

79-
80-
8191
}
8292
}

gradle.properties

Whitespace-only changes.

settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ plugins {
1111
}
1212

1313
rootProject.name = 'bedrockR'
14+
1415
include('app')

0 commit comments

Comments
 (0)