Skip to content

Commit 11ecbe2

Browse files
andrewheardncooke3
authored andcommitted
[Vertex AI] Enable AccessLevelOnImport and InternalImportsByDefault
1 parent 99c1466 commit 11ecbe2

11 files changed

+28
-19
lines changed

FirebaseVertexAI/Sources/GenerateContentResponse.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
import Foundation
15+
public import Foundation
1616

1717
/// The model's response to a generate content request.
1818
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)

FirebaseVertexAI/Sources/GenerativeAIRequest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
import Foundation
15+
public import Foundation
1616

1717
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
1818
protocol GenerativeAIRequest: Sendable, Encodable {

FirebaseVertexAI/Sources/PartsRepresentable+Image.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,14 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
import CoreGraphics
16+
import CoreImage
1517
import UniformTypeIdentifiers
18+
1619
#if canImport(UIKit)
17-
import UIKit // For UIImage extensions.
20+
public import UIKit // For UIImage extensions.
1821
#elseif canImport(AppKit)
19-
import AppKit // For NSImage extensions.
22+
public import AppKit // For NSImage extensions.
2023
#endif
2124

2225
private let imageCompressionQuality: CGFloat = 0.8

FirebaseVertexAI/Sources/Types/Public/Imagen/ImagenImagesBlockedError.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
import Foundation
15+
public import Foundation
1616

1717
/// An error that occurs when image generation fails due to all generated images being blocked.
1818
///

FirebaseVertexAI/Sources/Types/Public/Imagen/ImagenInlineImage.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
import Foundation
15+
public import Foundation
1616

1717
/// An image generated by Imagen, represented as inline data.
1818
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)

FirebaseVertexAI/Sources/Types/Public/Part.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
import Foundation
15+
public import Foundation
1616

1717
/// A discrete piece of data in a media format interpretable by an AI model.
1818
///

FirebaseVertexAI/Sources/VertexAI.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
1414

1515
import FirebaseAppCheckInterop
1616
import FirebaseAuthInterop
17-
import FirebaseCore
17+
import FirebaseCoreExtension
1818
import Foundation
1919

20-
// Avoids exposing internal FirebaseCore APIs to Swift users.
21-
@_implementationOnly import FirebaseCoreExtension
20+
public import FirebaseCore
2221

2322
/// The Vertex AI for Firebase SDK provides access to Gemini models directly from your app.
2423
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)

FirebaseVertexAI/Sources/VertexLog.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
import FirebaseCoreExtension
1516
import Foundation
1617
import os.log
1718

18-
@_implementationOnly import FirebaseCoreExtension
19-
2019
enum VertexLog {
2120
/// Log message codes for the Vertex AI SDK
2221
///

FirebaseVertexAI/Tests/Unit/GenerativeModelTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@
1515
import FirebaseAppCheckInterop
1616
import FirebaseAuthInterop
1717
import FirebaseCore
18+
import FirebaseVertexAI
1819
import XCTest
1920

20-
@testable import FirebaseVertexAI
21+
@testable import struct FirebaseVertexAI.APIConfig
2122

2223
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
2324
final class GenerativeModelTests: XCTestCase {
@@ -1690,8 +1691,7 @@ struct AppCheckErrorFake: Error {}
16901691

16911692
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
16921693
extension SafetyRating: Swift.Comparable {
1693-
public static func < (lhs: FirebaseVertexAI.SafetyRating,
1694-
rhs: FirebaseVertexAI.SafetyRating) -> Bool {
1694+
static func < (lhs: SafetyRating, rhs: SafetyRating) -> Bool {
16951695
return lhs.category.rawValue < rhs.category.rawValue
16961696
}
16971697
}

FirebaseVertexAI/Tests/Unit/VertexComponentTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
// limitations under the License.
1414

1515
@preconcurrency import FirebaseCore
16+
import FirebaseCoreExtension
17+
import FirebaseVertexAI
1618
import Foundation
1719
import XCTest
1820

19-
@_implementationOnly import FirebaseCoreExtension
20-
21-
@testable import FirebaseVertexAI
21+
@testable import struct FirebaseVertexAI.APIConfig
2222

2323
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
2424
class VertexComponentTests: XCTestCase {

0 commit comments

Comments
 (0)