-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update #3003
base: main
Are you sure you want to change the base?
update #3003
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>IDEDidComputeMac32BitWarning</key> | ||
<true/> | ||
</dict> | ||
</plist> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>SchemeUserState</key> | ||
<dict> | ||
<key>gradle.xcscheme_^#shared#^_</key> | ||
<dict> | ||
<key>orderHint</key> | ||
<integer>0</integer> | ||
</dict> | ||
</dict> | ||
</dict> | ||
</plist> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"colors" : [ | ||
{ | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"platform" : "ios", | ||
"size" : "1024x1024" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"scale" : "1x", | ||
"size" : "16x16" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"scale" : "2x", | ||
"size" : "16x16" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"scale" : "1x", | ||
"size" : "32x32" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"scale" : "2x", | ||
"size" : "32x32" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"scale" : "1x", | ||
"size" : "128x128" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"scale" : "2x", | ||
"size" : "128x128" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"scale" : "1x", | ||
"size" : "256x256" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"scale" : "2x", | ||
"size" : "256x256" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"scale" : "1x", | ||
"size" : "512x512" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"scale" : "2x", | ||
"size" : "512x512" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// | ||
// ContentView.swift | ||
// gradle | ||
// | ||
// Created by Anubhi Tomar on 22/07/24. | ||
// | ||
|
||
import SwiftUI | ||
|
||
struct ContentView: View { | ||
@Binding var document: gradleDocument | ||
|
||
var body: some View { | ||
TextEditor(text: $document.text) | ||
} | ||
} | ||
|
||
#Preview { | ||
ContentView(document: .constant(gradleDocument())) | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleDocumentTypes</key> | ||
<array> | ||
<dict> | ||
<key>CFBundleTypeRole</key> | ||
<string>Editor</string> | ||
<key>LSItemContentTypes</key> | ||
<array> | ||
<string>com.example.plain-text</string> | ||
</array> | ||
<key>NSUbiquitousDocumentUserActivityType</key> | ||
<string>$(PRODUCT_BUNDLE_IDENTIFIER).example-document</string> | ||
</dict> | ||
</array> | ||
<key>UTImportedTypeDeclarations</key> | ||
<array> | ||
<dict> | ||
<key>UTTypeConformsTo</key> | ||
<array> | ||
<string>public.plain-text</string> | ||
</array> | ||
<key>UTTypeDescription</key> | ||
<string>Example Text</string> | ||
<key>UTTypeIdentifier</key> | ||
<string>com.example.plain-text</string> | ||
<key>UTTypeTagSpecification</key> | ||
<dict> | ||
<key>public.filename-extension</key> | ||
<array> | ||
<string>exampletext</string> | ||
</array> | ||
</dict> | ||
</dict> | ||
</array> | ||
</dict> | ||
</plist> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>com.apple.security.app-sandbox</key> | ||
<true/> | ||
<key>com.apple.security.files.user-selected.read-write</key> | ||
<true/> | ||
</dict> | ||
</plist> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// | ||
// gradleApp.swift | ||
// gradle | ||
// | ||
// Created by Anubhi Tomar on 22/07/24. | ||
// | ||
|
||
import SwiftUI | ||
|
||
@main | ||
struct gradleApp: App { | ||
var body: some Scene { | ||
DocumentGroup(newDocument: gradleDocument()) { file in | ||
ContentView(document: file.$document) | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,39 @@ | ||||||
// | ||||||
// gradleDocument.swift | ||||||
// gradle | ||||||
// | ||||||
// Created by Anubhi Tomar on 22/07/24. | ||||||
// | ||||||
|
||||||
import SwiftUI | ||||||
import UniformTypeIdentifiers | ||||||
|
||||||
extension UTType { | ||||||
static var exampleText: UTType { | ||||||
UTType(importedAs: "com.example.plain-text") | ||||||
} | ||||||
} | ||||||
|
||||||
struct gradleDocument: FileDocument { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Struct name should start with an uppercase character. The struct name - struct gradleDocument: FileDocument {
+ struct GradleDocument: FileDocument { Committable suggestion
Suggested change
ToolsSwiftLint
|
||||||
var text: String | ||||||
|
||||||
init(text: String = "Hello, world!") { | ||||||
self.text = text | ||||||
} | ||||||
|
||||||
static var readableContentTypes: [UTType] { [.exampleText] } | ||||||
|
||||||
init(configuration: ReadConfiguration) throws { | ||||||
guard let data = configuration.file.regularFileContents, | ||||||
let string = String(data: data, encoding: .utf8) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prefer using UTF-8 encoded strings. Prefer using UTF-8 encoded strings when converting between - let string = String(data: data, encoding: .utf8)
+ let string = String(decoding: data, as: UTF8.self) Committable suggestion
Suggested change
ToolsSwiftLint
|
||||||
else { | ||||||
throw CocoaError(.fileReadCorruptFile) | ||||||
} | ||||||
text = string | ||||||
} | ||||||
|
||||||
func fileWrapper(configuration: WriteConfiguration) throws -> FileWrapper { | ||||||
let data = text.data(using: .utf8)! | ||||||
return .init(regularFileWithContents: data) | ||||||
} | ||||||
} |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,35 @@ | ||||||
// | ||||||
// gradleTests.swift | ||||||
// gradleTests | ||||||
// | ||||||
// Created by Anubhi Tomar on 22/07/24. | ||||||
// | ||||||
|
||||||
import XCTest | ||||||
|
||||||
final class gradleTests: XCTestCase { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Class name should start with an uppercase character. The class name - final class gradleTests: XCTestCase {
+ final class GradleTests: XCTestCase { Committable suggestion
Suggested change
ToolsSwiftLint
|
||||||
|
||||||
override func setUpWithError() throws { | ||||||
// Put setup code here. This method is called before the invocation of each test method in the class. | ||||||
} | ||||||
|
||||||
override func tearDownWithError() throws { | ||||||
// Put teardown code here. This method is called after the invocation of each test method in the class. | ||||||
} | ||||||
|
||||||
func testExample() throws { | ||||||
// This is an example of a functional test case. | ||||||
// Use XCTAssert and related functions to verify your tests produce the correct results. | ||||||
// Any test you write for XCTest can be annotated as throws and async. | ||||||
// Mark your test throws to produce an unexpected failure when your test encounters an uncaught error. | ||||||
// Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards. | ||||||
} | ||||||
|
||||||
func testPerformanceExample() throws { | ||||||
// This is an example of a performance test case. | ||||||
measure { | ||||||
// Put the code you want to measure the time of here. | ||||||
} | ||||||
} | ||||||
|
||||||
} |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,41 @@ | ||||||
// | ||||||
// gradleUITests.swift | ||||||
// gradleUITests | ||||||
// | ||||||
// Created by Anubhi Tomar on 22/07/24. | ||||||
// | ||||||
|
||||||
import XCTest | ||||||
|
||||||
final class gradleUITests: XCTestCase { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Class name should start with an uppercase character. The class name - final class gradleUITests: XCTestCase {
+ final class GradleUITests: XCTestCase { Committable suggestion
Suggested change
ToolsSwiftLint
|
||||||
|
||||||
override func setUpWithError() throws { | ||||||
// Put setup code here. This method is called before the invocation of each test method in the class. | ||||||
|
||||||
// In UI tests it is usually best to stop immediately when a failure occurs. | ||||||
continueAfterFailure = false | ||||||
|
||||||
// In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. | ||||||
} | ||||||
|
||||||
override func tearDownWithError() throws { | ||||||
// Put teardown code here. This method is called after the invocation of each test method in the class. | ||||||
} | ||||||
|
||||||
func testExample() throws { | ||||||
// UI tests must launch the application that they test. | ||||||
let app = XCUIApplication() | ||||||
app.launch() | ||||||
|
||||||
// Use XCTAssert and related functions to verify your tests produce the correct results. | ||||||
} | ||||||
|
||||||
func testLaunchPerformance() throws { | ||||||
if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) { | ||||||
// This measures how long it takes to launch your application. | ||||||
measure(metrics: [XCTApplicationLaunchMetric()]) { | ||||||
XCUIApplication().launch() | ||||||
} | ||||||
} | ||||||
} | ||||||
} |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,32 @@ | ||||||
// | ||||||
// gradleUITestsLaunchTests.swift | ||||||
// gradleUITests | ||||||
// | ||||||
// Created by Anubhi Tomar on 22/07/24. | ||||||
// | ||||||
|
||||||
import XCTest | ||||||
|
||||||
final class gradleUITestsLaunchTests: XCTestCase { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Class name should start with an uppercase character. The class name - final class gradleUITestsLaunchTests: XCTestCase {
+ final class GradleUITestsLaunchTests: XCTestCase { Committable suggestion
Suggested change
ToolsSwiftLint
|
||||||
|
||||||
override class var runsForEachTargetApplicationUIConfiguration: Bool { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prefer Use - override class var runsForEachTargetApplicationUIConfiguration: Bool {
+ override static var runsForEachTargetApplicationUIConfiguration: Bool { Committable suggestion
Suggested change
ToolsSwiftLint
|
||||||
true | ||||||
} | ||||||
|
||||||
override func setUpWithError() throws { | ||||||
continueAfterFailure = false | ||||||
} | ||||||
|
||||||
func testLaunch() throws { | ||||||
let app = XCUIApplication() | ||||||
app.launch() | ||||||
|
||||||
// Insert steps here to perform after app launch but before taking a screenshot, | ||||||
// such as logging into a test account or navigating somewhere in the app | ||||||
|
||||||
let attachment = XCTAttachment(screenshot: app.screenshot()) | ||||||
attachment.name = "Launch Screen" | ||||||
attachment.lifetime = .keepAlways | ||||||
add(attachment) | ||||||
} | ||||||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Anubhi tomar | ||
Aditya rathoud |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
tomar | ||
rathoud |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename
gradleApp
toGradleApp
.The type name should start with an uppercase character to follow Swift naming conventions.
Committable suggestion
Tools
SwiftLint