mini2Dx/parcl

Unable to bundleNative on Windows

HybridEidolon opened this issue · 5 comments

The following build error:

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':bundleNative'.
> Task with path 'installApp' not found in root project 'parcltest'.

occurs when building on Windows with a gradlew or IDEA's gradle runner.

My build.gradle

group 'com.idolagames'
version '1.0-SNAPSHOT'

buildscript {
    ext.kotlin_version = '1.0.6'

    repositories {
        mavenLocal()
        maven { url "https://mini2dx.org/maven/content/repositories/thirdparty" }
        maven { url "https://mini2dx.org/maven/content/repositories/releases" }
        mavenCentral()
    }
    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath group: 'org.mini2Dx', name: 'parcl', version: '1.0.11'
    }
}

apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'application'
apply plugin: "org.mini2Dx.parcl"

sourceCompatibility = 1.5

mainClassName = "idola.MainKt"

sourceSets {
    main {
        java {
            srcDirs = ['src/java']
        }
        kotlin {
            srcDirs = ['src/kotlin']
        }
        resources {
            srcDirs = ['src/resources']
        }
    }
}

parcl {
    exe {
        exeName = "parcltest"
    }
}

repositories {
    mavenCentral()
}

dependencies {
    compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}

At some point, the task installApp in the application plugin for Gradle was renamed to installDist, adding this to the build.gradle works around it:

task('installApp', dependsOn: 'installDist') {}

Seems installApp was replaced by installDist in Gradle 3.0. I'll need to add some detection for this.

The fix is now available in 1.0.12 on Maven Central.

The README still shows an example using version 1.0.11, you might want to update it to prevent others having this issue.

Whoops! Fixed README in 4f6b9ce