Update to Swift 6
This commit is contained in:
parent
ee6233dc4f
commit
34f5b46d60
4
.github/workflows/docs.yml
vendored
4
.github/workflows/docs.yml
vendored
@ -19,7 +19,7 @@ jobs:
|
|||||||
environment:
|
environment:
|
||||||
name: github-pages
|
name: github-pages
|
||||||
url: ${{ steps.deployment.outputs.page_url }}
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
runs-on: macos-14
|
runs-on: macos-15
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Install Libadwaita
|
- name: Install Libadwaita
|
||||||
@ -47,7 +47,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "<script>window.location.href += \"/documentation/adwaita\"</script>" > docs/index.html;
|
echo "<script>window.location.href += \"/documentation/adwaita\"</script>" > docs/index.html;
|
||||||
sed -i '' 's/#06f/#ea3358/g' docs/css/documentation-topic~topic~tutorials-overview.d6f5411c.css
|
sed -i '' 's/#06f/#ea3358/g' docs/css/documentation-topic~topic~tutorials-overview.d6f5411c.css
|
||||||
sed -i '' 's/,2px/,10px/g' docs/css/index.038e887c.css
|
sed -i '' 's/,2px/,10px/g' docs/css/index.*.css
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-pages-artifact@v3
|
uses: actions/upload-pages-artifact@v3
|
||||||
with:
|
with:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// swift-tools-version: 5.9
|
// swift-tools-version: 6.0
|
||||||
//
|
//
|
||||||
// Package.swift
|
// Package.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
@ -53,5 +53,6 @@ let package = Package(
|
|||||||
name: "Demo",
|
name: "Demo",
|
||||||
dependencies: ["Adwaita"]
|
dependencies: ["Adwaita"]
|
||||||
)
|
)
|
||||||
]
|
],
|
||||||
|
swiftLanguageModes: [.v5]
|
||||||
)
|
)
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
// Created by david-swift on 15.01.24.
|
// Created by david-swift on 15.01.24.
|
||||||
//
|
//
|
||||||
|
|
||||||
extension Int: Identifiable {
|
extension Int: @retroactive Identifiable {
|
||||||
|
|
||||||
/// Get the integer itself as the identifier.
|
/// Get the integer itself as the identifier.
|
||||||
public var id: Int { self }
|
public var id: Int { self }
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
// Created by david-swift on 14.01.24.
|
// Created by david-swift on 14.01.24.
|
||||||
//
|
//
|
||||||
|
|
||||||
extension String: CodingKey {
|
extension String: @retroactive CodingKey {
|
||||||
|
|
||||||
/// The string.
|
/// The string.
|
||||||
public var stringValue: String {
|
public var stringValue: String {
|
||||||
|
@ -89,15 +89,12 @@ struct Property: Decodable {
|
|||||||
let property = convertPropertyName(configuration: genConfig)
|
let property = convertPropertyName(configuration: genConfig)
|
||||||
let builder = ((type?.isWidget ?? false) || (type?.isMenu ?? false)) ? "@ViewBuilder " : ""
|
let builder = ((type?.isWidget ?? false) || (type?.isMenu ?? false)) ? "@ViewBuilder " : ""
|
||||||
let mainParameter = parameter(config: config, genConfig: genConfig, modifier: true, defaultValue: true)
|
let mainParameter = parameter(config: config, genConfig: genConfig, modifier: true, defaultValue: true)
|
||||||
var sideParameters = ""
|
|
||||||
var sideAssignments = ""
|
|
||||||
return """
|
return """
|
||||||
|
|
||||||
\(doc?.docComment(indent: " ") ?? "/// \(name)")
|
\(doc?.docComment(indent: " ") ?? "/// \(name)")
|
||||||
public func \(convertPropertyName(configuration: genConfig))(\(sideParameters)\(builder)_ \(mainParameter)) -> Self {
|
public func \(convertPropertyName(configuration: genConfig))(\(builder)_ \(mainParameter)) -> Self {
|
||||||
var newSelf = self
|
var newSelf = self
|
||||||
newSelf.\(property) = \(property)
|
newSelf.\(property) = \(property)
|
||||||
\(sideAssignments)
|
|
||||||
return newSelf
|
return newSelf
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"app-id": "io.github.AparokshaUI.Demo",
|
"app-id": "io.github.AparokshaUI.Demo",
|
||||||
"runtime": "org.gnome.Platform",
|
"runtime": "org.gnome.Platform",
|
||||||
"runtime-version": "46",
|
"runtime-version": "47",
|
||||||
"sdk": "org.gnome.Sdk",
|
"sdk": "org.gnome.Sdk",
|
||||||
"sdk-extensions": [
|
"sdk-extensions": [
|
||||||
"org.freedesktop.Sdk.Extension.swift5"
|
"org.freedesktop.Sdk.Extension.swift6"
|
||||||
],
|
],
|
||||||
"command": "Demo",
|
"command": "Demo",
|
||||||
"finish-args": [
|
"finish-args": [
|
||||||
@ -15,8 +15,8 @@
|
|||||||
"--socket=wayland"
|
"--socket=wayland"
|
||||||
],
|
],
|
||||||
"build-options": {
|
"build-options": {
|
||||||
"append-path": "/usr/lib/sdk/swift5/bin",
|
"append-path": "/usr/lib/sdk/swift6/bin",
|
||||||
"prepend-ld-library-path": "/usr/lib/sdk/swift5/lib"
|
"prepend-ld-library-path": "/usr/lib/sdk/swift6/lib"
|
||||||
},
|
},
|
||||||
"cleanup": [
|
"cleanup": [
|
||||||
"/include",
|
"/include",
|
||||||
|
Loading…
Reference in New Issue
Block a user