Skip to content

Commit

Permalink
Merge pull request #400 from Millibyte1/gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
Millibyte1 authored Dec 9, 2022
2 parents 715ee13 + 3aa1901 commit cd7d13e
Show file tree
Hide file tree
Showing 34 changed files with 321 additions and 2,201 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/publish-javadoc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# modified from https://github.com/MathieuSoysal/Javadoc-publisher.yml

name: Publish Javadoc

on:
push:
branches:
- gradle

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Publish JavaDoc
uses: MathieuSoysal/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
javadoc-branch: javadoc
java-version: 8
target-folder: docs
project: gradle
2 changes: 1 addition & 1 deletion bin/main/edu/rpi/legup/legup/config
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<puzzle name="LightUp"
qualifiedClassName="edu.rpi.legup.puzzle.lightup.LightUp"
fileType=".xml"
fileCreationDisabled="false"/>
fileCreationDisabled="true"/>
<puzzle name="Masyu"
qualifiedClassName="edu.rpi.legup.puzzle.masyu.Masyu"
fileType=".xml"
Expand Down
108 changes: 0 additions & 108 deletions build.gradle

This file was deleted.

90 changes: 90 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
plugins {
`java-library`
checkstyle
id("edu.sc.seis.launch4j") version("2.5.3")
id("com.github.johnrengelman.shadow") version "4.0.4"
}
repositories {
mavenCentral()
}


/* Maven artifact coordinates */
group = "edu.rpi.Legup"
version = "2.0.0"
val artifactId = "Legup"

/* important / reused build properties */
object BuildProps {
const val mainClassName = "edu.rpi.legup.Legup"
const val splashImagePath = "edu/rpi/legup/images/Legup/LegupSplash.png"
val minJavaVersion = JavaVersion.VERSION_1_8
const val minJavaVersionString = "1.8.0"
}


java {
sourceCompatibility = BuildProps.minJavaVersion
targetCompatibility = BuildProps.minJavaVersion
}

dependencies {
implementation("org.jetbrains:annotations:23.0.0")
implementation("org.apache.httpcomponents:httpclient:4.5.13")
api("org.slf4j:slf4j-api:2.0.4")
api("org.slf4j:slf4j-simple:2.0.4")
api("org.apache.logging.log4j:log4j-api:2.19.0")
api("org.apache.logging.log4j:log4j-core:2.19.0")
api("org.apache.commons:commons-lang3:3.12.0")
testImplementation("junit:junit:4.13.2")
}

tasks {
jar {
manifest {
attributes(
"Implementation-Title" to artifactId,
"Implementation-Version" to project.version,
"Main-Class" to BuildProps.mainClassName,
"SplashScreen-Image" to BuildProps.splashImagePath
)
}
}

javadoc {
// prevent javadoc task failure from semantic errors in Javadoc -- errors will still be logged
isFailOnError = false
}

/*
* CREATES NATIVE WINDOWS EXECUTABLE
* Launches launch4j to create an executable (.exe) file wrapping the jar
* THIS IS NOT THE INSTALLER
* Add "icon = "path/to/icon.ico"" to set an icon for the executable
*/
createExe {
mainClassName = BuildProps.mainClassName
outputDir = "../native/windows"
outfile = "bin/Legup.exe"
bundledJrePath = "jre"
bundledJre64Bit = true
jdkPreference = "preferJre"
jreMinVersion = BuildProps.minJavaVersionString
jreRuntimeBits = "64/32"
}

/*
* CREATES NATIVE WINDOWS INSTALLER -- ONLY RUNS ON WINDOWS
* Runs the shipped version of Inno Setup (6.2) to compile the installer
* Modify the setup settings in native/windows/legup_inno_setup.iss
*
* Modifications are likely required to run the setup script on your computer:
* Edit the "CHANGE ME" line in native/windows/legup_inno_setup.iss to reflect
* the path to the Java installation you want to ship inside the executable.
*/
register<Exec>("buildNativeWindows") {
dependsOn(shadowJar, createExe)
workingDir = File("${project.buildDir}/../native/windows")
commandLine("cmd", "/c", "make_windows_installer.bat")
}
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Empty file modified gradlew
100644 → 100755
Empty file.
1 change: 0 additions & 1 deletion legup-update/bin/main/edu.rpi.legupupdate/VERSION

This file was deleted.

22 changes: 0 additions & 22 deletions legup-update/build.gradle

This file was deleted.

112 changes: 0 additions & 112 deletions legup-update/src/main/java/edu/rpi/legupupdate/NetUtil.java

This file was deleted.

Loading

0 comments on commit cd7d13e

Please sign in to comment.