Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ body:
label: Plugin Version
description: What version of the plugin are you running?
options:
- "1.0"
- "1.1"
- "1.0"
- Other
default: 1
default: 0
validations:
required: true
- type: dropdown
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ body:
label: Plugin Version
description: What version of the plugin are you running?
options:
- "1.0"
- "1.1"
- "1.0"
- Other
default: 1
default: 0
validations:
required: true
- type: textarea
Expand Down
7 changes: 7 additions & 0 deletions addon/addon-build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ tasks {
@Suppress("UNCHECKED_CAST")
val iosLinkerFlags = extra["iosLinkerFlags"] as List<String>

@Suppress("UNCHECKED_CAST")
val iosBundleFiles = extra["iosBundleFiles"] as List<String>

@Suppress("UNCHECKED_CAST")
val iosSpmDependencies = extra["iosSpmDependencies"] as List<SpmDependency>

Expand Down Expand Up @@ -209,6 +212,7 @@ tasks {
put("iosFrameworks", iosFrameworks.toQuotedString())
put("iosEmbeddedFrameworks", iosEmbeddedFrameworks.toQuotedString())
put("iosLinkerFlags", iosLinkerFlags.toQuotedString())
put("iosBundleFiles", iosBundleFiles.toQuotedString())
put("spmDependencies", iosSpmDependencies.toGdscriptFormat())
}

Expand Down Expand Up @@ -239,6 +243,7 @@ tasks {
inputs.property("iosFrameworks", iosFrameworks.joinToString())
inputs.property("iosEmbeddedFrameworks", iosEmbeddedFrameworks.joinToString())
inputs.property("iosLinkerFlags", iosLinkerFlags.joinToString())
inputs.property("iosBundleFiles", iosBundleFiles.joinToString())
inputs.property("iosSpmDependencies", iosSpmDependencies.joinToString())

outputs.dir("$outputDir/addons/GMPShared")
Expand Down Expand Up @@ -273,6 +278,7 @@ tasks {
put("iosFrameworks", iosFrameworks.toQuotedString())
put("iosEmbeddedFrameworks", iosEmbeddedFrameworks.toQuotedString())
put("iosLinkerFlags", iosLinkerFlags.toQuotedString())
put("iosBundleFiles", iosBundleFiles.toQuotedString())
put("spmDependencies", iosSpmDependencies.toGdscriptFormat())
}

Expand Down Expand Up @@ -303,6 +309,7 @@ tasks {
inputs.property("iosFrameworks", iosFrameworks.joinToString())
inputs.property("iosEmbeddedFrameworks", iosEmbeddedFrameworks.joinToString())
inputs.property("iosLinkerFlags", iosLinkerFlags.joinToString())
inputs.property("iosBundleFiles", iosBundleFiles.joinToString())
inputs.property("iosSpmDependencies", iosSpmDependencies.joinToString())

outputs.dir("$outputDir/addons/${pluginConfig.pluginName}")
Expand Down
19 changes: 19 additions & 0 deletions android/android-build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -336,12 +336,31 @@ val testRuntimeOnlyDependencies =
.map { findLibrary(it).get().get() }
}

val artifactType = Attribute.of("artifactType", String::class.java)

dependencies {
"rewrite"(libs.rewrite.static.analysis)
implementation("godot:godot-lib:${godotConfig.godotVersion}.${godotConfig.godotReleaseType}@aar")
androidDependencies.forEach { implementation(it) }
testDependencies.forEach { testImplementation(it) }
testRuntimeOnlyDependencies.forEach { testRuntimeOnly(it) }

attributesSchema {
attribute(artifactType) {
disambiguationRules.add(JarFirstRule::class.java)
}
}
}

// Helper class to prioritize JARs when multiple variants match
abstract class JarFirstRule : AttributeDisambiguationRule<String> {
override fun execute(details: MultipleCandidatesDetails<String>) {
if (details.candidateValues.contains("jar")) {
details.closestMatch("jar")
} else if (details.candidateValues.contains("android-classes-jar")) {
details.closestMatch("android-classes-jar")
}
}
}

// -- Helpers -------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//

// Compiles all convention plugins (precompiled script plugins) in
// src/main/kotlin/*.gradle.kts and makes them - together with their
// src/main/java/*.gradle.kts and makes them - together with their
// runtime dependencies - available to every subproject that applies them.
//
// Versions are kept in sync with gradle/libs.versions.toml via the
Expand All @@ -26,3 +26,12 @@ sourceSets {
java.srcDirs("src/main/kotlin")
}
}

kotlin {
jvmToolchain(17)
}

tasks.withType<JavaCompile>().configureEach {
targetCompatibility = "17"
sourceCompatibility = "17"
}
1 change: 1 addition & 0 deletions common/build-logic/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ dependencyResolutionManagement {
}

rootProject.name = "build-logic"
rootProject.buildFileName = "logic.gradle.kts"
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import kotlinx.serialization.decodeFromString
* | `frameworks` | [frameworks] | System framework names to link, e.g. `["Foundation.framework"]` |
* | `embedded_frameworks` | [embeddedFrameworks] | Frameworks to embed in the app bundle (may be empty) |
* | `flags` | [linkerFlags] | Extra linker flags, e.g. `["-ObjC"]` |
* | `bundle_files` | [bundleFiles] | Files to include in the app bundle, e.g. `["res://afile.task"]` |
*
* Comma-separated properties (`frameworks`, `embedded_frameworks`, `flags`) are
* split into [List]s at load time - blank entries are dropped - so consumers never
Expand Down Expand Up @@ -91,6 +92,13 @@ data class IosConfig(
* Empty when no extra flags are required.
*/
val linkerFlags: List<String>,
/**
* Files to include in the app bundle.
*
* Parsed from the comma-separated `bundle_files` key in `ios.properties`.
* Empty when no extra files are required.
*/
val bundleFiles: List<String>,
/**
* Swift Package Manager dependencies decoded from `ios/config/spm_dependencies.json`.
*
Expand Down Expand Up @@ -155,6 +163,7 @@ data class IosConfig(
frameworks = props.splitList("frameworks"),
embeddedFrameworks = props.splitList("embedded_frameworks"),
linkerFlags = props.splitList("flags"),
bundleFiles = props.splitList("bundle_files"),
spmDependencies = spmDependencies,
testPlatform = props.require("test_platform"),
testDestinationName = props.require("test_destination_name"),
Expand Down
29 changes: 29 additions & 0 deletions common/build-logic/src/main/java/SpmDependency.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//
// © 2026-present https://github.com/cengiz-pz
//

import kotlinx.serialization.Serializable

/**
* Represents a single Swift Package Manager dependency entry decoded from
* `ios/config/spm_dependencies.json`.
*
* JSON shape:
* ```json
* {
* "url": "https://github.com/owner/repo",
* "version": "1.2.3",
* "products": ["ProductOne", "ProductTwo"]
* }
* ```
*
* @property url Git repository URL of the Swift package.
* @property version Minimum version (passed to `spm_manager.rb` as the package requirement).
* @property products List of SPM product names to link against.
*/
@Serializable
data class SpmDependency(
val url: String,
val version: String,
val products: List<String>,
)
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ project.extra["iosSwiftVersion"] = iosConfig.swiftVersion
project.extra["iosFrameworks"] = iosConfig.frameworks // List<String>
project.extra["iosEmbeddedFrameworks"] = iosConfig.embeddedFrameworks // List<String>
project.extra["iosLinkerFlags"] = iosConfig.linkerFlags // List<String>
project.extra["iosBundleFiles"] = iosConfig.bundleFiles // List<String>
project.extra["iosSpmDependencies"] = iosConfig.spmDependencies // List<SpmDependency>

// -- Shared directory layout (replaces common.gradle.kts) ---------------------
Expand Down
12 changes: 0 additions & 12 deletions common/build-logic/src/main/kotlin/SpmDependency.kt

This file was deleted.

Loading
Loading