Skip to content
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

Android support #244

Merged
merged 3 commits into from
Jan 14, 2025
Merged

Android support #244

merged 3 commits into from
Jan 14, 2025

Conversation

marcprux
Copy link
Contributor

Add Android support

Motivation:

Support the Android platform.

Modifications:

Add Android imports and fix the default temporary directory to be correct for the OS.

Result:

The package will build and test on Android.

@glbrntt glbrntt added the 🔨 semver/patch No public API change. label Jan 14, 2025
Copy link
Contributor

@glbrntt glbrntt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Copy link
Contributor

@glbrntt glbrntt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marcprux the formatter is unhappy but otherwise this looks great

@marcprux
Copy link
Contributor Author

@marcprux the formatter is unhappy but otherwise this looks great

Is there any indication of what it doesn't like? The action log at https://github.com/apple/swift-nio-extras/actions/runs/12766669331/job/35592455040?pr=244 just reports a failure without any diagnostic message.

@Lukasa
Copy link
Contributor

Lukasa commented Jan 14, 2025

It wants you to apply this diff:

diff --git a/Tests/NIOExtrasTests/WritePCAPHandlerTest.swift b/Tests/NIOExtrasTests/WritePCAPHandlerTest.swift
index ab6c28a..1489d5b 100644
--- a/Tests/NIOExtrasTests/WritePCAPHandlerTest.swift
+++ b/Tests/NIOExtrasTests/WritePCAPHandlerTest.swift
@@ -16,12 +16,13 @@ import Foundation
 import NIOCore
 import NIOEmbedded
 import XCTest
+
+@testable import NIOExtras
+
 #if canImport(Android)
 import Android
 #endif
 
-@testable import NIOExtras
-
 class WritePCAPHandlerTest: XCTestCase {
     private var accumulatedPackets: [ByteBuffer]!
     private var channel: EmbeddedChannel!

@marcprux
Copy link
Contributor Author

It wants you to apply this diff:

Done in 63cf347

Copy link
Contributor

@Lukasa Lukasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one, thanks!

@Lukasa Lukasa enabled auto-merge (squash) January 14, 2025 16:35
@Lukasa Lukasa merged commit aa0d902 into apple:main Jan 14, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants