GithubHelp home page GithubHelp logo

qingjubaitang / kotlin-ant-dsl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from devcharly/kotlin-ant-dsl

0.0 2.0 0.0 252 KB

Kotlin Ant DSL

License: Apache License 2.0

Kotlin 99.96% Shell 0.02% Batchfile 0.02%

kotlin-ant-dsl's Introduction

Kotlin Ant DSL

Build Status Download

Kotlin Ant DSL allows using Ant tasks from Kotlin.

Ant {
    echo("Hello World")
    mkdir("dir1")
    copy(todir = "dir1") {
        fileset(dir = "dir2")
            include(name = "**/*.txt")
        }
    }
}

Examples

Define a function to use a custom Ant task:

fun Ant.myanttask(attr1: String, attr2: String) {
    MyAntTask().execute("myanttask") { task ->
        task.setAttr1(attr1)
        task.setAttr2(attr2)
    }
}

Execute custom Ant Task:

Ant {
    myanttask("value1", "value2")
}

Supported Ant features

Tasks

Types

Converter

The Converter converts Ant XML files to Kotlin Ant DSL. Note that Kotlin Ant DSL does not support some Ant tags (e.g. <project> and <target>). So you can not compile/run the output, but you can copy the parts that you need. The primary goal is support migration of Ant builds to Kotlin based build systems (e.g. Kobalt)

Generator

The Kotlin code for the Ant tasks DSL is generated. See generator. If you miss some tasks, you can add them to generator/Main.kt and use ./kobaltw generator:run to generate the DSL. Then use ./kobaltw assemble to compile the DSL.

Who uses Kotlin Ant DSL?

Download

Download

For Maven, Gradle or Kobalt use:

Repository: jcenter (or https://dl.bintray.com/devcharly/maven/) 
Group:      com.devcharly
Artifact:   kotlin-ant-dsl
Version:    (latest)

Requirements

Ant 1.9.7 or later

kotlin-ant-dsl's People

Contributors

devcharly avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.