Skip to content

Commit

Permalink
Merge pull request #38 from quanshousio/4.0.0
Browse files Browse the repository at this point in the history
Release 4.0.0
  • Loading branch information
quanshousio authored Aug 11, 2024
2 parents 1828801 + 93c1689 commit 146e2f5
Show file tree
Hide file tree
Showing 31 changed files with 976 additions and 1,023 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build
name: Build

on:
push:
Expand All @@ -7,22 +7,23 @@ on:
branches: [main]

jobs:
swiftlint:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: swiftlint
uses: norio-nomura/action-swiftlint@3.2.1
build:
runs-on: macos-latest

strategy:
matrix:
platform: [iOS, tvOS, watchOS, macOS, mac-catalyst]

steps:
- name: checkout
uses: actions/checkout@v2
- name: build
- name: Checkout repository
uses: actions/checkout@v4

- name: Run swiftlint
uses: cirruslabs/swiftlint-action@v1
with:
version: latest

- name: Run xcodebuild
run: |
PLATFORM=${{ matrix.platform }}
if [[ $PLATFORM == iOS ]]; then
Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/docc.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
name: docc
name: DocC documentation

on:
push:
tags:
- '*'
push:
tags:
- "*"

jobs:
docbuild:
runs-on: macos-latest

steps:
- name: checkout
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: docc
run: ./toastui docc deploy

- name: Deploy documentation
run: ./toastui docc deploy
112 changes: 112 additions & 0 deletions .swiftformat
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# SwiftFormat config compliant with Google Swift Guideline
# https://google.github.io/swift/#control-flow-statements

# Specify version used in a project

--swiftversion 5.10

# Rules explicitly required by the guideline

--rules \
blankLinesAroundMark, \
blankLinesAtEndOfScope, \
blankLinesAtStartOfScope, \
blankLinesBetweenScopes, \
braces, \
consecutiveBlankLines, \
consecutiveSpaces, \
duplicateImports, \
elseOnSameLine, \
emptyBraces, \
enumNamespaces, \
extensionAccessControl, \
hoistPatternLet, \
indent, \
leadingDelimiters, \
linebreakAtEndOfFile, \
markTypes, \
organizeDeclarations, \
redundantInit, \
redundantParens, \
redundantPattern, \
redundantRawValues, \
redundantType, \
redundantVoidReturnType, \
semicolons, \
sortImports, \
sortSwitchCases, \
spaceAroundBraces, \
spaceAroundBrackets, \
spaceAroundComments, \
spaceAroundGenerics, \
spaceAroundOperators, \
spaceAroundParens, \
spaceInsideBraces, \
spaceInsideBrackets, \
spaceInsideComments, \
spaceInsideGenerics, \
spaceInsideParens, \
todos, \
trailingClosures, \
trailingCommas, \
trailingSpace, \
typeSugar, \
void, \
wrap, \
wrapArguments, \
wrapAttributes, \
#
#
# Additional rules not mentioned in the guideline, but helping to keep the codebase clean
# Quoting the guideline:
# Common themes among the rules in this section are:
# avoid redundancy, avoid ambiguity, and prefer implicitness over explicitness
# unless being explicit improves readability and/or reduces ambiguity.
#
#
andOperator, \
isEmpty, \
redundantBackticks, \
redundantBreak, \
redundantExtensionACL, \
redundantGet, \
redundantLetError, \
redundantNilInit, \
redundantObjc, \
redundantOptionalBinding, \
redundantReturn, \
redundantSelf, \
strongifiedSelf

# Options for basic rules

--extensionacl on-declarations
--funcattributes prev-line
--indent 2
--maxwidth 100
--typeattributes prev-line
--funcattributes prev-line
--storedvarattrs same-line
--computedvarattrs prev-line
--complexattrs prev-line
--voidtype void
--wraparguments before-first
--wrapparameters before-first
--wrapcollections before-first
--wrapreturntype if-multiline
--wrapconditions after-first

# Option for additional rules

--self init-only

--organizationmode type
--markcategories false
--marktypes never
--markextensions never

# Excluded folders

--exclude Pods,**/UNTESTED_TODO,vendor,fastlane

# https://github.com/NoemiRozpara/Google-SwiftFormat-Config
2 changes: 1 addition & 1 deletion .swiftpm/xcode/xcshareddata/xcschemes/ToastUI.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1230"
LastUpgradeVersion = "1600"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
30 changes: 28 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file. `ToastUI` adheres to [Semantic Versioning](https://semver.org/).

#### 4.x Releases

* `4.0.x` Releases - [4.0.0](#400)

#### 3.x Releases

* `3.0.x` Releases - [3.0.0](#300) | [3.0.1](#301)
Expand All @@ -19,14 +23,36 @@ All notable changes to this project will be documented in this file. `ToastUI` a

---

## [4.0.0](https://github.com/quanshousio/ToastUI/releases/tag/4.0.0)

Released on 2024-08-10.

#### Changed

* Minimum required version for Swift is 5.7.

#### Added

* Support for visionOS. Minimum required version for visionOS is 1.0.

#### Updated

* Refactor the core implementation.
* Toasts now dismiss immediately, even during transitions.
* Documentation to use new DocC version.
* Remove padding from the background in DefaultToastView.
* Update GitHub actions.

---

## [3.0.1](https://github.com/quanshousio/ToastUI/releases/tag/3.0.1)

Released on 2022-07-19.

#### Updated

* Remove `fixedSize` modifier from `Label` in `DefaultToastView`.
* Add new AppIcon.
* Add a new AppIcon.

## [3.0.0](https://github.com/quanshousio/ToastUI/releases/tag/3.0.0)

Expand Down Expand Up @@ -57,7 +83,7 @@ Released on 2022-04-11.

#### Added

* Support for watchOS. Minimum required version for watchOS is 7.0
* Support for watchOS. Minimum required version for watchOS is 7.0.
* Static property/function for all built-in styles to leverage the new static member lookup functionality.
* `toastDimmedBackground` modifier for enabling or disabling the dimmed background.
* `IconToastViewStyle` style for showing a toast with an icon and a headline text label.
Expand Down
14 changes: 4 additions & 10 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
// swift-tools-version:5.5
// swift-tools-version:5.7

import PackageDescription

let package = Package(
name: "ToastUI",
platforms: [
.iOS(.v14), .tvOS(.v14), .watchOS(.v7), .macOS(.v11)
],
products: [
.library(name: "ToastUI", targets: ["ToastUI"])
],
targets: [
.target(name: "ToastUI")
]
platforms: [.iOS(.v14), .tvOS(.v14), .watchOS(.v7), .macOS(.v11)],
products: [.library(name: "ToastUI", targets: ["ToastUI"])],
targets: [.target(name: "ToastUI")]
)
Loading

0 comments on commit 146e2f5

Please sign in to comment.