maiyama18 / licensesplugin Goto Github PK
View Code? Open in Web Editor NEWA Swift Package build tool plugin to collect licenses of the library used in your swift package
License: MIT License
A Swift Package build tool plugin to collect licenses of the library used in your swift package
License: MIT License
I don't know if it's possible now, but it would be nice to support XcodeProjectPlugin.
An example of SwiftLint plugin is below.
Now this library uses .prebuildCommand
, so the plugin is executed on every build, which is unnecessary. It would be better if the plugin only run when needed by replacing .prebuildCommand
by .buildCommand
and specify input and output files properly.
This plugin provides only data of licenses. It would be nice if default simple UI is also provided.
Generated code is now not formatted correctly like below example. It works, but it looks better if it is formatted.
public enum LicensesPlugin {
public struct License: Identifiable, Equatable, Hashable {
public let id: String
public let name: String
public let licenseText: String?
}
public static let licenses: [License] = [
License(
id: "swift-async-algorithms",
name: "AsyncAlgorithms",
licenseText: """
// ...
設定画面の日本語でのライセンスがタイポ
I would like to use LicensesPlugin
in my app, but I have found that it is a bit difficult to use with multi moduled package.
For my usecase, there is one App module and other feature modules (ListFeature
, DetailFeature
, SettingsFeature
and so on.). Probably I can introduce LicensesPlugin
in App
module but I need to convey the generated list into SettingsFeature
to show on UI in SettingsPage. but License
struct is unavailable outside of App module.
I think this usecase is not supported as of v0.1.3
.
To solve it, I would like you to export interface of LicensesPlugin.License
as a package to use it in other package except for App
package.
Currently, my project is configured with the following Package.swift.
let package = Package(
...
.target(
name: "Licence",
plugins: [
.plugin(name: "LicensesPlugin", package: "LicensesPlugin")
]
),
...
.executableTarget(
name: "SomeBinary"
)
)
When I try to use SomeBinary in a swift build, the following error occurs.
error: Plugin does not have access to a tool named "cp".
It seems that the location of the cp command has not been discovered.
This does not affect the execution of SomeBinary.
Provide license of this plugin as an example that can be used from previews or tests. Only for debug build.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.