Skip to content

muryoh/gradle-ikvm-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gradle IKVM Plugin Build Status

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.

Below tasks are provided by the plugin:

ikvm

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

Simplest usage:

buildscript {
    repositories {
        mavenCentral()
    }

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

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

repositories {
    mavenCentral()
}

More options:

// ikvmCompile configuration is added, and can be filled with dependencies (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
    ikvmHome = '../ikvm-0.46.0.1'
    
    
    // Below values have sensible defaults but can be overriden
    
    // 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
    
    // Other ikvmc options can be set:
    // fileVersion, target, main, classloader, delaySign, compressResources, removeAssertions, srcPath ...
}

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 Creative Commons � CC0 1.0 Universal license with no warranty (expressed or implied) for any purpose.

About

Gradle plugin for IKVM artifact compilation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 76.1%
  • Groovy 23.9%