Skip to content

Commit

Permalink
Merge pull request #28 from aalmiray/gradle-build
Browse files Browse the repository at this point in the history
Refactor build settings
  • Loading branch information
brunoborges committed Dec 6, 2018
2 parents 796584d + 3fbb65a commit cd452d9
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 36 deletions.
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ steps:
jdkArchitectureOption: 'x64'
publishJUnitResults: false
testResultsFiles: '**/TEST-*.xml'
tasks: 'build'
tasks: 'jlinkZip'
50 changes: 15 additions & 35 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,49 +1,29 @@
buildscript {
repositories {
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.google.gradle:osdetector-gradle-plugin:1.6.0'
classpath 'org.kordamp.gradle:jdeps-gradle-plugin:0.5.0'
classpath 'org.kordamp.gradle:jdeprscan-gradle-plugin:0.4.0'
classpath 'gradle.plugin.gradle-java9-collision:plugin:0.2.3'
classpath 'org.javamodularity:moduleplugin:1.2.1'
classpath 'gradle.plugin.org.beryx:badass-jlink-plugin:2.1.6'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.20.0'
classpath 'org.slf4j:slf4j-simple:1.8.0-beta2'
}
plugins {
id 'java'
id 'application'
id 'org.openjfx.javafxplugin' version '0.0.5'
id 'org.jonnyzzz.java9c' version '0.2.3'
id 'org.beryx.jlink' version '2.1.6'
id 'com.github.ben-manes.versions' version '0.20.0'
}

println "JVM: " + org.gradle.internal.jvm.Jvm.current()

apply plugin: 'java'
apply plugin: 'application'
apply plugin: 'com.google.osdetector'
apply plugin: 'org.kordamp.gradle.jdeps'
apply plugin: 'org.kordamp.gradle.jdeprscan'
apply plugin: 'org.jonnyzzz.java9c'
apply plugin: 'org.javamodularity.moduleplugin'
apply plugin: 'org.beryx.jlink'
apply plugin: 'com.github.ben-manes.versions'

repositories {
mavenCentral()
}

ext.platform = osdetector.os == 'osx' ? 'mac' : osdetector.os == 'windows' ? 'win' : osdetector.os

mainClassName = "fxgame/game2048.Game2048"
mainClassName = 'fxgame/game2048.Game2048'

dependencies {
compile "org.openjfx:javafx-base:11.0.1:$platform"
compile "org.openjfx:javafx-graphics:11.0.1:$platform"
compile "org.openjfx:javafx-controls:11.0.1:$platform"
javafx {
modules = [
'javafx.base',
'javafx.graphics',
'javafx.controls'
]
}

jlink {
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
launcher {
name = 'game2048'
}
}
}
6 changes: 6 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pluginManagement {
repositories {
jcenter()
maven { url 'https://plugins.gradle.org/m2/' }
}
}

0 comments on commit cd452d9

Please sign in to comment.