com.ullink.gradle:gradle-ikvm-plugin

gradle-ikvm-plugin is a Gradle plugin for IKVM artifact compilation

License

License

Categories

Categories

Gradle Build Tools
GroupId

GroupId

com.ullink.gradle
ArtifactId

ArtifactId

gradle-ikvm-plugin
Last Version

Last Version

2.9
Release Date

Release Date

Type

Type

jar
Description

Description

com.ullink.gradle:gradle-ikvm-plugin
gradle-ikvm-plugin is a Gradle plugin for IKVM artifact compilation
Project URL

Project URL

https://github.com/Ullink/gradle-ikvm-plugin
Source Code Management

Source Code Management

https://github.com/Ullink/gradle-ikvm-plugin.git

Download gradle-ikvm-plugin

How to add to project

<!-- https://jarcasting.com/artifacts/com.ullink.gradle/gradle-ikvm-plugin/ -->
<dependency>
    <groupId>com.ullink.gradle</groupId>
    <artifactId>gradle-ikvm-plugin</artifactId>
    <version>2.9</version>
</dependency>
// https://jarcasting.com/artifacts/com.ullink.gradle/gradle-ikvm-plugin/
implementation 'com.ullink.gradle:gradle-ikvm-plugin:2.9'
// https://jarcasting.com/artifacts/com.ullink.gradle/gradle-ikvm-plugin/
implementation ("com.ullink.gradle:gradle-ikvm-plugin:2.9")
'com.ullink.gradle:gradle-ikvm-plugin:jar:2.9'
<dependency org="com.ullink.gradle" name="gradle-ikvm-plugin" rev="2.9">
  <artifact name="gradle-ikvm-plugin" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.ullink.gradle', module='gradle-ikvm-plugin', version='2.9')
)
libraryDependencies += "com.ullink.gradle" % "gradle-ikvm-plugin" % "2.9"
[com.ullink.gradle/gradle-ikvm-plugin "2.9"]

Dependencies

runtime (3)

Group / Artifact Type Version
org.apache.commons : commons-lang3 jar 3.4
commons-io : commons-io jar 2.5
commons-codec : commons-codec jar 1.10

Project Modules

There are no modules declared in this project.

Gradle IKVM Plugin Build status Join the chat at https://gitter.im/Ullink/gradle-ikvm-plugin

This plugin allows to compile the project jar into a .Net assembly using IKVM. It supports various IKVM flags, and also allows for .Net API documentation generation.

Main Features

  • Command line wrapper around IKVM.
  • Supports all IKVM flags.
  • Easy way to include 3rd party DLLs into the build process.
  • No need to install IKVM locally as it can be downloaded during the build process. Handy for CI Enviroments.
  • Works also on Unix & Mac by using Mono.

Below tasks are provided by the plugin, if you apply the ikvm plugin. You can alternatively apply just the ikvm-base if you want to create your custom tasks.

ikvm

This task depend on standard jar task, and builds the corresponding assembly. It can be configured by a usual gradle convention.

Simplest usage:

Build script snippet can be used in all Gradle versions:

buildscript {
    repositories {
        mavenCentral()
    }

    dependencies {
        classpath "com.ullink.gradle:gradle-ikvm-plugin:2.3"
    }
}

apply plugin:'java'
apply plugin:'ikvm'

repositories {
    mavenCentral()
}

Build script snippet can be used instead with Gradle 2.1+

plugins {
  id "com.ullink.ikvm" version "2.3"
}

More options:

// ikvmcompile allows to provide 3rd Party DLLs to the process (provided the dlls are available in some repository of yours)
dependencies {
    ikvmcompile group: 'foo', name: 'bar', version: '1.0', type: '.dll'
}

ikvm {
    // If defined, the plugin will use IKVM_HOME environment variable ...
    // ... otherwise it will download (& cache) Ikvm release zip from official download links (sourceforge & www.frijters.net) ...
    ikvmVersion = '7.2.4630.4'

    // ... but you can also specify the Ikvm folder yourself then this will be used.
    ikvmHome = '../ikvm-0.46.0.1'

    // Below values have sensible __defaults__ but can be overriden

    // input jar(s) to transform to IL (defaults to jar task output)
    jars = [ jar.archivePath ]

    // Where will the assembly be generated
    destinationDir = jar.destinationDir

    // Assembly name
    assemblyName = project.name

    // Assembly version
    version = project.version

    // KeyFile for assembly signing
    keyFile = null

    // Generates PDB file for debugging purposes
    debug = true

    // Generates XML documentation file (from javadoc through custom DocLet)
    generateDoc = false

    // Whether to handle warnings as errors - not compatible with all IKVM versions
    // as it was introduced in IKVM 7. If necessary, use the code specific one
    warnAsError = true

    // Warning codes that should be considered as errors
    warnAsError = [105, 110, 120]

    // Other ikvmc options can be set:
    // fileVersion, target, main, classloader, delaySign, compressResources, removeAssertions, srcPath ...
    
    //removes the current CLR runtime directory from the search path, you should add reference dependencies manually see ikvmcompile
    nostdlib = true
}

Usage

When everything is setup correctly just run gradle ikvm.

ikvmDoc

This task extends standard javadoc task, and allows XML documentation to be generated for the assembly. It depends on ikvm task, and uses a custom DocLet to generate the documentation. Note: you can also have the documentation generated by ikvm task, using generateDoc = true.

Sample usage: either invoke gradle ikvmDoc or customize it:

task myDoc(type: IkvmDoc) {
    // customize javadoc options here
}

License

All these plugins are licensed under the Apache License, Version 2.0 with no warranty (expressed or implied) for any purpose.

com.ullink.gradle

Itiviti

Follow us on our new Github! https://github.com/Itiviti

Versions

Version
2.9
2.8
2.7
2.5
2.4
2.3
2.1
2.0
1.5
1.4
1.3
1.2
1.1