Skip to content

Commit

Permalink
install4j task within gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
micheljung committed Jun 26, 2015
1 parent 82f69bc commit 421bb4d
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apply plugin: 'idea'
apply plugin: 'application'
apply plugin: 'jacoco'
apply plugin: 'com.github.kt3k.coveralls'
apply plugin: 'install4j'

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
Expand All @@ -12,12 +13,21 @@ version = '0.4.2-alpha'
mainClassName = "com.faforever.client.Main"
applicationDefaultJvmArgs = ["-Djava.library.path=../lib"]

if (!hasProperty('install4jHomeDir')) {
File propertiesFile = file("${System.getProperty('user.home')}/.gradle/gradle.properties")
throw new RuntimeException("Specify install4jHomeDir in $propertiesFile")
}

jacocoTestReport {
reports {
xml.enabled = true
}
}

install4j {
installDir = file(install4jHomeDir)
}

idea {
project {
jdkName = JavaVersion.VERSION_1_8
Expand All @@ -42,25 +52,35 @@ task copyNativeLibs(type: Copy) {
into "$buildDir/native"
}

task wrapper(type: Wrapper) {
gradleVersion = '2.4'
}

applicationDistribution.from(copyNativeLibs) {
into "lib"
}

task buildInstaller(type: com.install4j.gradle.Install4jTask) {
dependsOn 'installDist'

projectFile = file('downlords-faf-client.install4j')
release = version
}
task wrapper(type: Wrapper) {
gradleVersion = '2.4'
}

repositories {
mavenCentral()
}

buildscript {
repositories {
mavenCentral()
maven {
url 'http://maven.ej-technologies.com/repository'
}
}

dependencies {
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.4.0'
classpath 'com.install4j:gradle-plugin:6.0'
}
}

Expand Down

0 comments on commit 421bb4d

Please sign in to comment.