Skip to content

How to build both debug and release versions of the library? #8

@chokokatana

Description

@chokokatana

I'm trying to create two binary version of the library, one with debug info, and the other without. I've tried to use twice the multiplatformSwiftPackage gradle option like this:

multiplatformSwiftPackage {
    packageName("$customIosName-release")
    outputDirectory(File(projectDir, "../dist-ios"))
    swiftToolsVersion("5.5")
    distributionMode { local() }
    targetPlatforms {
        iOS { v("15") }
    }
    buildConfiguration {
        release()
    }
}

multiplatformSwiftPackage {
    packageName("$customIosName-debug")
    outputDirectory(File(projectDir, "../dist-ios"))
    swiftToolsVersion("5.5")
    distributionMode { local() }
    targetPlatforms {
        iOS { v("15") }
    }
    buildConfiguration {
        debug()
    }
}

It seems the second block overrides the first. So right now I need to build one configuration, then change gradle, build the other one, and restore the original one for git to not complain.

Is there a better way to do this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions