This registers classes by their registered name instead of their relative path. This lifts the restriction on where registration files can be placed.
This thus also updates the registration file generation:
New registration files will be placed in the out directory defined by the user (like it works today).
Existing registration files are updated at their path
Obsolete registration files are deleted
This allows a user to freely move registration files inside the godot project.
Note: This approach has one limitation: When a class is renamed, it essentially is a "new" class to godot. Hence an existing registration file is deleted and a new one is created in the registration out directory. It will not be generated into the directory the previous registration file was present if it was moved manually!
This problem can be circumvented by using our idea plugin which should automatically rename a corresponding gdj file if a class is renamed.
As per request of @CedNaru, this additionally adds new information to KtClass:
relativeSourcePath: String describing the path to the source file (kt or java) relative to the godot project root.
This PR contains one breaking change:
Before the registration file directory structure inside dependencies was defined by the settings of the library author. Now it follows the users configuration instead.
Resolves #500 Note: depends on #528
This registers classes by their registered name instead of their relative path. This lifts the restriction on where registration files can be placed. This thus also updates the registration file generation:
This allows a user to freely move registration files inside the godot project.
Note: This approach has one limitation: When a class is renamed, it essentially is a "new" class to godot. Hence an existing registration file is deleted and a new one is created in the registration out directory. It will not be generated into the directory the previous registration file was present if it was moved manually!
This problem can be circumvented by using our idea plugin which should automatically rename a corresponding gdj file if a class is renamed.
As per request of @CedNaru, this additionally adds new information to KtClass:
This PR contains one breaking change: Before the registration file directory structure inside
dependencies
was defined by the settings of the library author. Now it follows the users configuration instead.