项目作者: chRyNaN

项目描述 :
Kotlin Multi-platform Target Gradle Plugin
高级语言: Kotlin
项目地址: git://github.com/chRyNaN/target.git
创建时间: 2020-09-15T03:08:16Z
项目社区:https://github.com/chRyNaN/target

开源协议:Apache License 2.0

下载


target

Kotlin Multi-platform Target Gradle Plugin. This Gradle Plugin generates a JSON file, and optional SVGs, for the available Kotlin Targets in a Kotlin Multi-platform Module.
This allows easy access to which Kotlin Targets a module supports, for example in a README file.

Using the library

Using the Plugin

  • Apply the plugin

    1. apply plugin: "com.chrynan.target.plugin"
  • Setup the extension

    1. kotlinTargetDataGenerator {
    2. generateJson = true
    3. generateSvg = true
    4. outputPath = "path/to/generated/output"
    5. }
  • Run the Gradle Task
    ./gradlew generateKotlinTargetData

Refer to the target-example module for an example on how to use the library and for the generated output.

Parsing the JSON Kotlin Targets

  • Add the target-core module as a dependency

    1. implementation "com.chrynan.target:target-core:$VERSION"
  • Provide the JSON String to the KotlinTargetContainer.fromJsonString() function

    1. val container = KotlinTargetContainer.fromJsonString(jsonStringValue)

Building the library

The library is provided through Bintray. Checkout the releases page to get the latest version.

Plugin

  1. buildscript {
  2. repositories {
  3. maven {
  4. url = "https://dl.bintray.com/chrynan/chrynan"
  5. }
  6. }
  7. dependencies {
  8. classpath "com.chrynan.target:target-plugin:$VERSION"
  9. }
  10. }
  11. apply plugin: "com.chrynan.target.plugin"

Runtime

Repository

  1. repositories {
  2. maven {
  3. url = uri("https://dl.bintray.com/chrynan/chrynan")
  4. }
  5. }

Dependencies

Kotlin Common:

  1. implementation "com.chrynan.colors:target-core:$VERSION"

Kotlin JVM:

  1. implementation "com.chrynan.colors:target-core-jvm:$VERSION"

Kotlin JS:

  1. implementation "com.chrynan.colors:target-core-js:$VERSION"

Kotlin iOS ARM64:

  1. implementation "com.chryan.colors:target-core-ios-arm64:$VERSION"

Kotlin iOS x64:

  1. implementation "com.chrynan.colors:target-core-ios-x64:$VERSION"

License

  1. Copyright 2020 chRyNaN
  2. Licensed under the Apache License, Version 2.0 (the "License");
  3. you may not use this file except in compliance with the License.
  4. You may obtain a copy of the License at
  5. http://www.apache.org/licenses/LICENSE-2.0
  6. Unless required by applicable law or agreed to in writing, software
  7. distributed under the License is distributed on an "AS IS" BASIS,
  8. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  9. See the License for the specific language governing permissions and
  10. limitations under the License.