Skip to content

Commit

Permalink
Check in Generated API.
Browse files Browse the repository at this point in the history
  • Loading branch information
samdeane committed Nov 29, 2024
1 parent 7489ad5 commit 30a7121
Show file tree
Hide file tree
Showing 960 changed files with 501,229 additions and 1,037 deletions.
7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Godot 4+ specific ignores
.godot/
.DS_Store
/.build
/.index-build
.build/
.index-build/
/Packages
/*.xcodeproj
xcuserdata/
Expand All @@ -17,6 +17,5 @@ build-docs.log
\#*
/libgodot.xcframework/
Package.resolved
/.vscode
.vscode
.swiftpm/xcode/xcshareddata/xcschemes
GeneratedForDebug/
10 changes: 5 additions & 5 deletions Generator/Generator/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ var defaultExtensionApiJsonUrl: URL {

var defaultGeneratorOutputlUrl: URL {
rootUrl
.appendingPathComponent("GeneratedForDebug")
.appendingPathComponent("Sources")
.appending(path: "Sources")
.appending(path: "SwiftGodot")
.appending(path: "Generated")
}

var defaultDocRootUrl: URL {
rootUrl
.appendingPathComponent("GeneratedForDebug")
.appendingPathComponent("Docs")
}

Expand Down Expand Up @@ -138,8 +138,8 @@ for mo in jsonApi.builtinClassMemberOffsets {
}
}

let generatedBuiltinDir: String? = singleFile ? nil : (outputDir + "/generated-builtin/")
let generatedDir: String? = singleFile ? nil : (outputDir + "/generated/")
let generatedBuiltinDir: String? = singleFile ? nil : (outputDir + "/Builtin/")
let generatedDir: String? = singleFile ? nil : (outputDir + "/Api/")

if singleFile {
try! FileManager.default.createDirectory(atPath: outputDir, withIntermediateDirectories: true)
Expand Down
14 changes: 1 addition & 13 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ var products: [Product] = [
"ExtensionApi",
"ExtensionApiJson"
]),
.plugin(name: "CodeGeneratorPlugin", targets: ["CodeGeneratorPlugin"]),
.plugin(name: "EntryPointGeneratorPlugin", targets: ["EntryPointGeneratorPlugin"])
]

Expand Down Expand Up @@ -93,14 +92,6 @@ var targets: [Target] = [
]
),

// This is a build-time plugin that invokes the generator and produces
// the bindings that are compiled into SwiftGodot
.plugin(
name: "CodeGeneratorPlugin",
capability: .buildTool(),
dependencies: ["Generator"]
),

.plugin(
name: "EntryPointGeneratorPlugin",
capability: .buildTool(),
Expand All @@ -112,8 +103,6 @@ var targets: [Target] = [
name: "GDExtension"),
]

var swiftGodotPlugins: [Target.PluginUsage] = ["CodeGeneratorPlugin"]

// Macros aren't supported on Windows before 5.9.1
#if !(os(Windows) && swift(<5.9.1))
targets.append(contentsOf: [
Expand All @@ -133,7 +122,6 @@ targets.append(contentsOf: [
exclude: ["SwiftSprite.gdextension", "README.md"]),
//linkerSettings: linkerSettings),
])
swiftGodotPlugins.append("SwiftGodotMacroLibrary")
#endif

// Macro tests don't work on Windows yet
Expand Down Expand Up @@ -214,7 +202,7 @@ targets.append(contentsOf: [
swiftSettings: [
.define("CUSTOM_BUILTIN_IMPLEMENTATIONS")
],
plugins: swiftGodotPlugins
plugins: ["SwiftGodotMacroLibrary"]
),

// General purpose cross-platform tests
Expand Down
Loading

0 comments on commit 30a7121

Please sign in to comment.