Skip to content

Commit 595d5b0

Browse files
authored
Merge pull request #107 from touchlab/paraselene-main
Paraselene main
2 parents 8720965 + cc20f9e commit 595d5b0

File tree

5 files changed

+30
-4
lines changed

5 files changed

+30
-4
lines changed

BUILDING.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@ The xcode-kotlin plugin is written in **Kotlin**. It uses
55

66
Building environment: **IntelliJ IDEA**
77

8+
## Build Local Development Version
9+
10+
As this is a tool for Xcode, you'll need to run the build on a mac machine. We'll assume your machine is an ARM, Mx
11+
chip and not Intel. Replace the calls with X64 versions if needed.
12+
13+
To build, open a terminal in the root project folder and run:
14+
15+
```shell
16+
./gradlew preparePlugin linkDebugExecutableMacosArm64
17+
```
18+
19+
To test the local build, run the following:
20+
21+
```shell
22+
./build/bin/macosArm64/debugExecutable/xcode-kotlin.kexe [command]
23+
```
824

925
## Libraries
1026

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ plugins {
99
}
1010

1111
group = "co.touchlab"
12-
version = "1.3.0"
12+
version = "1.3.1"
1313

1414
kotlin {
1515
listOf(macosX64(), macosArm64()).forEach {

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ kotlinx-coroutines = "1.7.3"
44
kotlinx-cli = "0.3.6"
55
kotlinx-serialization = "1.6.0"
66
kermit = "1.2.2"
7-
gradle-doctor = "0.8.1"
7+
gradle-doctor = "0.9.2"
88

99
[libraries]
1010
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }

src/macosMain/kotlin/co/touchlab/xcode/cli/PluginManager.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ object PluginManager {
7373

7474
Console.echo("Synchronizing plugin compatibility list.")
7575
val additionalPluginCompatibilityIds =
76-
xcodeInstallations.map { PropertyList.Object.String(it.pluginCompatabilityId) }
76+
xcodeInstallations.mapNotNull { it.pluginCompatabilityId?.let { PropertyList.Object.String(it) } }
7777
logger.v { "Xcode installation IDs to include: ${additionalPluginCompatibilityIds.joinToString { it.value }}" }
7878
val infoPlist = PropertyList.create(pluginTargetInfoFile)
7979
val rootDictionary = infoPlist.root.dictionary

src/macosMain/kotlin/co/touchlab/xcode/cli/XcodeHelper.kt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ import co.touchlab.xcode.cli.XcodeHelper.Defaults.nonApplePlugins
55
import co.touchlab.xcode.cli.util.BackupHelper
66
import co.touchlab.xcode.cli.util.Console
77
import co.touchlab.xcode.cli.util.File
8+
import co.touchlab.xcode.cli.util.fromString
89
import co.touchlab.xcode.cli.util.Path
910
import co.touchlab.xcode.cli.util.PropertyList
1011
import co.touchlab.xcode.cli.util.Shell
12+
import co.touchlab.xcode.cli.util.Version
1113
import kotlinx.serialization.SerialName
1214
import kotlinx.serialization.Serializable
1315
import kotlinx.serialization.json.Json
@@ -83,6 +85,14 @@ object XcodeHelper {
8385
checkNotNull(versionPlist.build?.trim()) { "Couldn't get build number of Xcode at $path." }
8486
}
8587

88+
if (Version.fromString(version) >= Version.fromString("15.3")) {
89+
return XcodeInstallation(
90+
version = version,
91+
build = build,
92+
path = path
93+
)
94+
}
95+
8696
val xcodeInfoPath = path / "Contents" / "Info"
8797
val pluginCompatabilityIdResult = Shell.exec("/usr/bin/defaults", "read", xcodeInfoPath.value, "DVTPlugInCompatibilityUUID")
8898
.checkSuccessful {
@@ -154,7 +164,7 @@ object XcodeHelper {
154164
val version: String,
155165
val build: String,
156166
val path: Path,
157-
val pluginCompatabilityId: String,
167+
val pluginCompatabilityId: String? = null,
158168
) {
159169
val name: String = "Xcode $version ($build)"
160170
}

0 commit comments

Comments
 (0)