2017-10-11 123 views
0

我有一個.net項目,我使用MSBuild插件構建gradle。在最後一項任務中,我想創建一個.msi或.exe安裝程序,包括構建步驟中的dll。目前gradle這個構建腳本如下所示:在.net項目中使用setupbuilder插件創建msi或exe安裝程序

buildscript { 
    repositories { 
     mavenCentral() 
     jcenter() 
     maven { 
      url "https://plugins.gradle.org/m2/" 
     } 
    } 

    dependencies { 
     classpath "com.ullink.gradle:gradle-msbuild-plugin:2.16" 
     classpath "gradle.plugin.de.inetsoftware:SetupBuilder:1.8.0" 
    } 
} 

apply plugin: 'msbuild' 
apply plugin: "de.inetsoftware.setupbuilder" 

msbuild { 
// Project solution file 
    solutionFile = 'Test.sln' 

    targets = ['Clean', 'Rebuild'] 
} 

setupBuilder { 
    vendor = 'MyOrg' 
    application = "Test" 
    appIdentifier = "Test" 
    version = '1.0' 
    licenseFile = 'license.txt' 
    // icons in different sizes for different usage. you can also use a single *.ico or *.icns file 
    icons = 'test.icns' 
    // all files for all platforms 
    from('testbuild') { 
     include 'bin/Debug/*.dll' 
    } 
    bundleJre = 1.8 
} 

msi { 
    // files only for the Windows platform 

} 

當我運行gradle這個微星,錯誤是 -

Execution failed for task ':msi'. 
> org.gradle.api.internal.file.copy.CopyActionExecuter.<init>(Lorg/gradle/internal/reflect/Instantiator;Lorg/gradle/internal/nativeintegration/filesystem/FileSystem;)V 

我使用gradle這個4.2.1,wixtools,setupbuilder 1.8。有沒有任何依賴,我失蹤或代碼塊中的東西?

回答

0

據對GitHub插件referenceSetup Builder插件版本1.8需要Gradle版本3.0。當我嘗試插入版本爲Setup Builder的版本爲Gradle的版本大於3.0時,出現類似的問題(WiX Toolset版本爲3.11)。您可以使用Gradle 3.0重試。

相關問題