package com.ullink

import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.Task;
import org.gradle.api.plugins.BasePlugin;
import org.gradle.api.plugins.JavaBasePlugin;

class IkvmPlugin implements Plugin<Project> {
    void apply(Project project) {
        project.tasks.withType(Ikvm).whenTaskAdded { Ikvm task ->
            task.conventionMapping.map "ikvmVersion", { '7.2.4630.4' }
            task.conventionMapping.map "ikvmHome", {
                if (System.getenv()['IKVM_HOME']) {
                    return System.getenv()['IKVM_HOME']
                }
                def version = task.getIkvmVersion()
                return "http://downloads.sourceforge.net/project/ikvm/ikvm/${version}/ikvmbin-${version}.zip"
            }
        }

        project.apply plugin: 'java'

		Task ikvm = project.task('ikvm', type: Ikvm)
		ikvm.group = BasePlugin.BUILD_GROUP
		ikvm.description = 'Compiles the project jar into a .Net assembly.'

        Task ikvmDoc = project.task('ikvmDoc', type: IkvmDoc)
		ikvmDoc.group = JavaBasePlugin.DOCUMENTATION_GROUP
		ikvmDoc.description = 'Generates .Net API documentation (XML) for the main source code.'

    }
}

package com.ullink

import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.Task;
import org.gradle.api.plugins.BasePlugin;
import org.gradle.api.plugins.JavaBasePlugin;

class IkvmPlugin implements Plugin<Project> {
    void apply(Project project) {
        project.tasks.withType(Ikvm).whenTaskAdded { Ikvm task ->
            task.conventionMapping.map "ikvmVersion", { '7.2.4630.5' }
            task.conventionMapping.map "ikvmHome", {
                if (System.getenv()['IKVM_HOME']) {
                    return System.getenv()['IKVM_HOME']
                }
                def version = task.getIkvmVersion()
                return "http://downloads.sourceforge.net/project/ikvm/ikvm/${version}/ikvmbin-${version}.zip"
            }
        }

        project.apply plugin: 'java'

		Task ikvm = project.task('ikvm', type: Ikvm)
		ikvm.group = BasePlugin.BUILD_GROUP
		ikvm.description = 'Compiles the project jar into a .Net assembly.'

        Task ikvmDoc = project.task('ikvmDoc', type: IkvmDoc)
		ikvmDoc.group = JavaBasePlugin.DOCUMENTATION_GROUP
		ikvmDoc.description = 'Generates .Net API documentation (XML) for the main source code.'

    }
}

Update ikvm version to the one on sourceforge
Update ikvm version to the one on sourceforge

On http://downloads.sourceforge.net/project/ikvm/ikvm/ :
* 7.2.4630.4 is no longer available
* 7.2.4630.5 is the version available

Without this fix, we have errors
Caused by: java.io.FileNotFoundException:
 http://downloads.sourceforge.net/project/ikvm/ikvm/7.2.4630.4/
 ikvmbin-7.2.4630.4.zip

Change-Id: I2c9a72dbfb1134d64aca165e6d82f66ad0b761a8
