Skip to content

Commit

Permalink
fix: normalize package names for all package managers (#69)
Browse files Browse the repository at this point in the history
* fix: rename library/target to 'AmplitudeSwift' (Swift Package Manager)

* fix: rename TARGET_NAME

* fix: update imports in tests
  • Loading branch information
falconandy authored Aug 9, 2023
1 parent 5a946f7 commit 251ebdf
Show file tree
Hide file tree
Showing 26 changed files with 30 additions and 30 deletions.
4 changes: 2 additions & 2 deletions Amplitude-Swift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2,3,4";
TARGET_NAME = "Amplitude-Swift";
TARGET_NAME = "AmplitudeSwift";
TVOS_DEPLOYMENT_TARGET = 13.0;
WATCHOS_DEPLOYMENT_TARGET = 7.0;
};
Expand Down Expand Up @@ -817,7 +817,7 @@
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2,3,4";
TARGET_NAME = "Amplitude-Swift";
TARGET_NAME = "AmplitudeSwift";
TVOS_DEPLOYMENT_TARGET = 13.0;
WATCHOS_DEPLOYMENT_TARGET = 7.0;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "amplitude-swift::Amplitude-Swift"
BuildableName = "Amplitude_Swift.framework"
BuildableName = "AmplitudeSwift.framework"
BlueprintName = "Amplitude-Swift"
ReferencedContainer = "container:Amplitude-Swift.xcodeproj">
</BuildableReference>
Expand Down
8 changes: 4 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ let package = Package(
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "Amplitude-Swift",
targets: ["Amplitude-Swift"]
name: "AmplitudeSwift",
targets: ["AmplitudeSwift"]
)
],
dependencies: [
Expand All @@ -26,14 +26,14 @@ let package = Package(
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "Amplitude-Swift",
name: "AmplitudeSwift",
dependencies: [],
path: "Sources/Amplitude",
exclude: ["../../Examples/", "../../Tests/"]
),
.testTarget(
name: "Amplitude-SwiftTests",
dependencies: ["Amplitude-Swift"],
dependencies: ["AmplitudeSwift"],
path: "Tests/AmplitudeTests"
),
]
Expand Down
2 changes: 1 addition & 1 deletion Tests/AmplitudeTests/AmplitudeSessionTests.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import XCTest

@testable import Amplitude_Swift
@testable import AmplitudeSwift

final class AmplitudeSessionTests: XCTestCase {
private var configuration: Configuration!
Expand Down
2 changes: 1 addition & 1 deletion Tests/AmplitudeTests/AmplitudeTests.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import XCTest

@testable import Amplitude_Swift
@testable import AmplitudeSwift

final class AmplitudeTests: XCTestCase {
private var configuration: Configuration!
Expand Down
2 changes: 1 addition & 1 deletion Tests/AmplitudeTests/ConfigurationTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import XCTest

@testable import Amplitude_Swift
@testable import AmplitudeSwift

final class ConfigurationTests: XCTestCase {
let apiKey = "testApiKey"
Expand Down
2 changes: 1 addition & 1 deletion Tests/AmplitudeTests/ConsoleLoggerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import XCTest

@testable import Amplitude_Swift
@testable import AmplitudeSwift

final class ConsoleLoggerTests: XCTestCase {
func testConsoleLoggerInit() {
Expand Down
2 changes: 1 addition & 1 deletion Tests/AmplitudeTests/Events/BaseEventTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import XCTest

@testable import Amplitude_Swift
@testable import AmplitudeSwift

// swiftlint:disable force_cast
final class BaseEventTests: XCTestCase {
Expand Down
2 changes: 1 addition & 1 deletion Tests/AmplitudeTests/Events/GroupIdentifyEventTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import XCTest

@testable import Amplitude_Swift
@testable import AmplitudeSwift

final class GroupIdentifyEventTests: XCTestCase {
func testInit() {
Expand Down
2 changes: 1 addition & 1 deletion Tests/AmplitudeTests/Events/IdentifyEventTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import XCTest

@testable import Amplitude_Swift
@testable import AmplitudeSwift

final class IdentifyEventTests: XCTestCase {
func testInit() {
Expand Down
2 changes: 1 addition & 1 deletion Tests/AmplitudeTests/Events/IdentifyTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import XCTest

@testable import Amplitude_Swift
@testable import AmplitudeSwift

// swiftlint:disable force_cast
final class IdentifyTests: XCTestCase {
Expand Down
2 changes: 1 addition & 1 deletion Tests/AmplitudeTests/Events/RevenueEventTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import XCTest

@testable import Amplitude_Swift
@testable import AmplitudeSwift

final class RevenueEventTests: XCTestCase {
func testInit() {
Expand Down
2 changes: 1 addition & 1 deletion Tests/AmplitudeTests/Events/RevenueTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import XCTest

@testable import Amplitude_Swift
@testable import AmplitudeSwift

// swiftlint:disable force_cast
final class RevenueTests: XCTestCase {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import XCTest

@testable import Amplitude_Swift
@testable import AmplitudeSwift

final class LegacyDatabaseStorageTests: XCTestCase {
var storage: LegacyDatabaseStorage?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import XCTest

@testable import Amplitude_Swift
@testable import AmplitudeSwift

final class RemnantDataMigrationTests: XCTestCase {
var storage: LegacyDatabaseStorage?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import XCTest

@testable import Amplitude_Swift
@testable import AmplitudeSwift

final class StoragePrefixMigrationTests: XCTestCase {
func testUserDefaults() throws {
Expand Down
2 changes: 1 addition & 1 deletion Tests/AmplitudeTests/Storages/PersistentStorageTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import XCTest

@testable import Amplitude_Swift
@testable import AmplitudeSwift

final class PersistentStorageTests: XCTestCase {
func testIsBasicType() {
Expand Down
2 changes: 1 addition & 1 deletion Tests/AmplitudeTests/Supports/TestUtilities.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation
import XCTest

@testable import Amplitude_Swift
@testable import AmplitudeSwift

class TestEnrichmentPlugin: Plugin {
let type: PluginType
Expand Down
2 changes: 1 addition & 1 deletion Tests/AmplitudeTests/TimelineTests.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation
import XCTest

@testable import Amplitude_Swift
@testable import AmplitudeSwift

final class TimelineTests: XCTestCase {
private var timeline: Timeline!
Expand Down
2 changes: 1 addition & 1 deletion Tests/AmplitudeTests/TypesTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import XCTest

@testable import Amplitude_Swift
@testable import AmplitudeSwift

final class TypesTests: XCTestCase {
func testResponseHandler_collectIndices() {
Expand Down
2 changes: 1 addition & 1 deletion Tests/AmplitudeTests/Utilities/EventPipelineTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import XCTest

@testable import Amplitude_Swift
@testable import AmplitudeSwift

final class EventPipelineTests: XCTestCase {
private static let FLUSH_INTERVAL_SECONDS = 1.0
Expand Down
2 changes: 1 addition & 1 deletion Tests/AmplitudeTests/Utilities/HttpClientTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import XCTest

@testable import Amplitude_Swift
@testable import AmplitudeSwift

final class HttpClientTests: XCTestCase {
private var configuration: Configuration!
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import XCTest

@testable import Amplitude_Swift
@testable import AmplitudeSwift

final class IdentifyInterceptorTests: XCTestCase {
private static let IDENTIFY_UPLOAD_INTERVAL_SECONDS = 1.5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import XCTest

@testable import Amplitude_Swift
@testable import AmplitudeSwift

final class PersistentStorageResponseHandlerTests: XCTestCase {
private var configuration: Configuration!
Expand Down
2 changes: 1 addition & 1 deletion Tests/AmplitudeTests/Utilities/QueueTimeTests.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import XCTest

@testable import Amplitude_Swift
@testable import AmplitudeSwift

final class QueueTimerTests: XCTestCase {
func testRepeat() {
Expand Down
2 changes: 1 addition & 1 deletion Tests/AmplitudeTests/Utilities/UrlExtensionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import XCTest

@testable import Amplitude_Swift
@testable import AmplitudeSwift

final class UrlExtensionTests: XCTestCase {
func testAppendFileNameSuffix() {
Expand Down

0 comments on commit 251ebdf

Please sign in to comment.