Skip to content

Commit b1ba37f

Browse files
committed
Merge remote-tracking branch 'upstream/master' into patch-1
2 parents 1d4c75e + 20c2253 commit b1ba37f

File tree

168 files changed

+4022
-1792
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

168 files changed

+4022
-1792
lines changed

.github/workflows/deploy_jvm.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ on:
1313
type: string
1414

1515
env:
16-
GODOT_KOTLIN_GPG_PRIVATE_KEY_ASCII: ${{ secrets.GODOT_KOTLIN_GPG_PRIVATE_KEY_ASCII }}
17-
GODOT_KOTLIN_GPG_KEY_PASSPHRASE: ${{ secrets.GODOT_KOTLIN_GPG_KEY_PASSPHRASE }}
18-
GODOT_KOTLIN_MAVEN_CENTRAL_TOKEN_USERNAME: ${{ secrets.GODOT_KOTLIN_MAVEN_CENTRAL_TOKEN_USERNAME }}
19-
GODOT_KOTLIN_MAVEN_CENTRAL_TOKEN_PASSWORD: ${{ secrets.GODOT_KOTLIN_MAVEN_CENTRAL_TOKEN_PASSWORD }}
16+
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.UTOPIA_RISE_GPG_PRIVATE_KEY_ASCII }}
17+
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.UTOPIA_RISE_GPG_KEY_PASSPHRASE }}
18+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.UTOPIA_RISE_MAVEN_CENTRAL_PORTAL_TOKEN_USERNAME }}
19+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.UTOPIA_RISE_MAVEN_CENTRAL_PORTAL_TOKEN_PASSWORD }}
2020
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
2121
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
2222
GODOT_KOTLIN_INTELLIJ_PLUGIN_PUBLISH: ${{secrets.GODOT_KOTLIN_INTELLIJ_PLUGIN_PUBLISH }}
451 KB
Loading
218 KB
Loading
200 KB
Loading
34.5 KB
Loading
219 KB
Loading
39.5 KB
Loading

docs/src/doc/getting-started/compiling-your-project.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@ Using the Godot editor:
44

55
![Build button](../assets/img/editor-plugin/build_button.png)
66

7+
!!! warning
8+
On Linux or macOS you may receive an error when trying to build the project from the Godot editor (This can happen if you created your project via the IntelliJ template).
9+
```shell
10+
ERROR: Godot-JVM: Could not create child process: /Users/username/projectname/gradlew
11+
ERROR: at: execute_with_pipe (drivers/unix/os_unix.cpp:659)
12+
```
13+
14+
In such case, open up the terminal and change the permissions of the `gradlew` file to be executable.
15+
```shell
16+
chmod +x gradlew
17+
```
18+
719
Using your IDE:
820

921
![Gradle task](../assets/img/build_ide.png)
@@ -44,4 +56,4 @@ gradlew build -Prelease
4456

4557
Using debug builds is recommended when developing. It adds some sanity checks that are cut off in `release`.
4658

47-
Release builds are recommended when distributing to retail.
59+
Release builds are recommended when distributing to retail.

docs/src/doc/user-guide/debugging.md

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,53 @@ If you're still using the JDK installed on your system though, you don't need to
1212

1313
## Run and attach a Remote Debugger
1414

15-
Run your game with the command-line option `--jvm-debug-port=<port (normally 5005)>` and attach a remote debugger.
15+
Breakpoint based debugging is available via the remote debugger.
16+
17+
#### 1. Customize Run Instances in Godot
18+
19+
Open up the **Customize Run Instances** dialog from the **Debug** menu in Godot
20+
21+
![remote debug configuration_step_1](../assets/img/remote_debug_configuration_godot_menu.png)
22+
23+
#### 2. Specify the arguments
24+
25+
In the **Main Run Args**, you should specify your commandline options. In the example below we use port `5005` by specifying: `--jvm-debug-port=5005`
1626

1727
!!! info
1828
If you specify either `--jvm-debug-port` or `--jvm-debug-address` the execution of the game will suspend until you attach a remote debugger. You can configure this behaviour by specifying `--wait-for-debugger=true` or `--wait-for-debugger=false`
1929

20-
Example:
21-
![remote debug configuration](../assets/img/remote_debug_configuration.png)
30+
![remote debug configuration_step_2](../assets/img/remote_debug_configuration_godot_dialog.png)
31+
32+
#### 3. Create a new configuration in IntelliJ
33+
34+
Create a new **Configuration** using **Remote JVM Debug**
35+
36+
![remote debug configuration_step_3](../assets/img/remote_debug_configuration_intellij.png)
37+
38+
#### 4. Setup the new configuration in IntelliJ
39+
40+
Use the same port as you used in step 2, in our case `5005`
41+
![remote debug configuration_step_4](../assets/img/remote_debug_configuration.png)
42+
43+
#### 5. Set a breakpoint in IntelliJ
44+
45+
![remote debug configuration_step_5](../assets/img/remote_debug_configuration_intellij_breakpoint.png)
46+
47+
#### 6. Launch the game in Godot
48+
49+
Depending on your flags (`--wait-for-debugger`), the game will suspend until you attached the remote debugger from IntelliJ
50+
51+
#### 7. Run the Debug Game configuration
52+
53+
Run the **Debug Game** configuration you made earlier in IntelliJ
54+
55+
![remote debug configuration_step_6](../assets/img/remote_debug_configuration_intellij_configuration.png)
56+
57+
#### 8. Breakpoint
58+
59+
IntelliJ will now automatically pause when the breakpoint is hit
2260

61+
![remote debug configuration_step_7](../assets/img/remote_debug_configuration_intellij_breakpoint_hit.png)
2362

2463
## Write debug code
2564

@@ -32,4 +71,4 @@ Example:
3271
if (GodotJvmDefinitions.DEBUG) {
3372
// ...
3473
}
35-
```
74+
```

kt/api-generator/src/main/kotlin/godot/codegen/generation/rule/ApiRule.kt

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ import godot.tools.common.constants.TO_GODOT_NAME_UTIL_FUNCTION
2727

2828
class EnrichedCoreRule : GodotApiRule<ApiTask>() {
2929
override fun apply(task: ApiTask, context: GenerationContext) {
30-
val coreTypes = context.api.builtinClasses.associate { it.name to (it.enums?.toEnriched(GenerationType(it.name)) ?: listOf()) }
30+
val coreTypes = context.api.builtinClasses.associate {
31+
it.name to (it.enums?.toEnriched(GenerationType(it.name)) ?: listOf())
32+
}
3133
val globalEnumList = context.api.globalEnums.toEnriched()
3234
val globalEnumMap = globalEnumList.associateBy { it.identifier }
3335
val nativeStructureMap = mutableMapOf<String, EnrichedNativeStructure>()
@@ -53,8 +55,8 @@ class EnrichedCoreRule : GodotApiRule<ApiTask>() {
5355
class EnrichedClassRule : GodotApiRule<ApiTask>() {
5456
override fun apply(task: ApiTask, context: GenerationContext) {
5557
val classes = context.api.classes
56-
val classList = classes.toEnriched().filter { it.apiType == ApiType.CORE }
57-
val classMap = classList.associateBy { it.identifier }
58+
var classList = classes.toEnriched().filter { it.apiType == ApiType.CORE }
59+
var classMap = classList.associateBy { it.identifier }
5860

5961
classes.forEach {
6062
val enrichedChild = classMap[it.name]
@@ -69,6 +71,14 @@ class EnrichedClassRule : GodotApiRule<ApiTask>() {
6971
classMap[it.type]?.makeSingleton()
7072
}
7173

74+
75+
classList = classList
76+
.filter { clazz ->// Remove class extending singletons
77+
val parent = clazz.parent
78+
parent == null || !parent.isSingleton
79+
}
80+
classMap = classList.associateBy { it.identifier }
81+
7282
context.classMap += classMap
7383
context.classList += classList
7484

0 commit comments

Comments
 (0)