Skip to content
This repository has been archived by the owner on Aug 14, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1 from vgorloff/feature/[email protected]
Browse files Browse the repository at this point in the history
…n-01

More reliable and automated setup.
  • Loading branch information
vgorloff authored Dec 23, 2018
2 parents 2e47204 + 5ab2ef3 commit eb2a121
Show file tree
Hide file tree
Showing 39 changed files with 1,553 additions and 582 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@

/Build
/Install
/Temp
93 changes: 93 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
AllCops:
Exclude:
- Build/**/*
- Install/**/*
- Projects/**/*
- Sources/**/*

Metrics/AbcSize:
Max: 50

Metrics/ClassLength:
Max: 240

Metrics/MethodLength:
Max: 80

Metrics/CyclomaticComplexity:
Max: 20

Metrics/PerceivedComplexity:
Max: 20

Style/IfUnlessModifier:
Enabled: false

Style/SpecialGlobalVars:
Enabled: false

Style/BracesAroundHashParameters:
Enabled: false

Style/WordArray:
EnforcedStyle: brackets

Style/Documentation:
Enabled: false

Style/AsciiComments:
Enabled: false

Style/SymbolArray:
Enabled: false

Style/RedundantReturn:
Enabled: false

Style/MethodCallWithoutArgsParentheses:
Enabled: false

Style/GuardClause:
Enabled: false

Style/BlockDelimiters:
Enabled: false

Style/NegatedIf:
Enabled: false

Style/DefWithParentheses:
Enabled: false

Style/StringLiterals:
Enabled: false

Layout/EmptyLinesAroundClassBody:
EnforcedStyle: empty_lines

Layout/IndentationWidth:
Width: 3

Naming/VariableName:
EnforcedStyle: camelCase

Naming/MethodName:
Enabled: false

Style/InverseMethods:
Enabled: false

Layout/EmptyLinesAroundBlockBody:
Enabled: false

Naming/UncommunicativeMethodParamName:
Enabled: false

Naming/UncommunicativeBlockParamName:
Enabled: false

Layout/EmptyLinesAroundModuleBody:
Enabled: false

Metrics/LineLength:
Enabled: false
4 changes: 4 additions & 0 deletions Downloads/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/*/
/*.zip
/*.tgz
/*.tar.gz
1 change: 1 addition & 0 deletions Downloads/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Automatically or Manually downloadded Android NDK archive will be placed here
14 changes: 14 additions & 0 deletions Patches/swift-corelibs-foundation/MissedLocaleHeaders.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/build.py b/build.py
index 8ee475f374dbb2cf479d7447c953719643bf8075..b228a4dcc6fd4c04619e03d22ff32bbd93d076e9 100755
--- a/build.py
+++ b/build.py
@@ -211,6 +211,9 @@ private = [
'CoreFoundation/PlugIn.subproj/CFBundle_BinaryTypes.h',
'CoreFoundation/Locale.subproj/CFICULogging.h',
'CoreFoundation/Locale.subproj/CFLocaleInternal.h',
+ 'CoreFoundation/Locale.subproj/CFCalendar_Internal.h',
+ 'CoreFoundation/Locale.subproj/CFDateComponents.h',
+ 'CoreFoundation/Locale.subproj/CFDateInterval.h',
'CoreFoundation/StringEncodings.subproj/CFUnicodePrecomposition.h',
'CoreFoundation/Base.subproj/CFPriv.h',
'CoreFoundation/StringEncodings.subproj/CFUniCharPriv.h',
1 change: 1 addition & 0 deletions Patches/swift-corelibs-foundation/Readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Bugreport: https://bugs.swift.org/browse/SR-9513
13 changes: 13 additions & 0 deletions Patches/swift-corelibs-libdispatch/CmakeSystemProcessor.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/cmake/modules/SwiftSupport.cmake b/cmake/modules/SwiftSupport.cmake
index 60f8b45a33e1546dce4aa2b30d3f9070f7b37ab9..14b4e950210f72321f1418531687ad67fc44e7a2 100644
--- a/cmake/modules/SwiftSupport.cmake
+++ b/cmake/modules/SwiftSupport.cmake
@@ -228,6 +228,8 @@ function(get_swift_host_arch result_var_name)
set("${result_var_name}" "s390x" PARENT_SCOPE)
elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "armv6l")
set("${result_var_name}" "armv6" PARENT_SCOPE)
+ elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "armv7-a")
+ set("${result_var_name}" "armv7" PARENT_SCOPE)
elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "armv7l")
set("${result_var_name}" "armv7" PARENT_SCOPE)
elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "AMD64")
63 changes: 63 additions & 0 deletions Projects/Hello/hello.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,66 @@
// Project which uses Dispatch and Foundation frameworks will be added as soon,
// as Workflow will support Dispatch and Foundation frameworks compilation.
print("Hello, This Is Swift!")

/*
import Foundation
import Dispatch


let op = BlockOperation {
print("Operation")
}
let opQueue = OperationQueue()
opQueue.addOperations([op], waitUntilFinished: true)

let sema = DispatchSemaphore(value: 0)

let queue = DispatchQueue(label: "queueName")
queue.async {
print("XYZ")
sema.signal()
}

if sema.wait(timeout: .now() + 10) == .timedOut {
print("~~~~~~")
}

let config = URLSessionConfiguration()
let session = URLSession(configuration: config)
if let url = URL(string: "https://www.example.com") {
let sema2 = DispatchSemaphore(value: 0)
let task = session.dataTask(with: url) { data, response, error in
if let response = response {
print(response)
}
if let error = error {
print(error)
}
if let data = data {
print(data)
}
sema2.signal()
}
print(task)
task.resume()
if sema2.wait(timeout: .now() + 10) == .timedOut {
print("~~~~~~")
}
} else {
print("bad url")
}

let json = ["name": "Sveta"]
do {
let data = try JSONSerialization.data(withJSONObject: json, options: [])
struct Person: Decodable {
let name: String
}

let person = try JSONDecoder().decode(Person.self, from: data)
print(person.name)

} catch {
print(error)
}
*/
Loading

0 comments on commit eb2a121

Please sign in to comment.