Skip to content

Commit

Permalink
linux 版本构建
Browse files Browse the repository at this point in the history
  • Loading branch information
NBLJSBDK committed Aug 2, 2024
1 parent c4b048c commit f36935d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.0.2'
classpath 'com.android.tools.build:gradle:8.5.1'
// classpath 'com.google.gms:google-services:4.3.13'
// classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.1'
}
Expand All @@ -13,7 +13,7 @@ buildscript {
allprojects {

ext {
appName = 'Statistical SPD'
appName = 'Statistical-SPD'
appPackageName = 'com.shatteredpixel.shatteredpixeldungeon.statistical'

appVersionCode = 20240525
Expand All @@ -37,4 +37,4 @@ allprojects {
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}

}
}
17 changes: 10 additions & 7 deletions desktop/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sourceCompatibility = targetCompatibility = appJavaCompatibility
ext.appMainClass = "com.shatteredpixel.shatteredpixeldungeon.desktop.DesktopLauncher"
processResources {
from new File(project(':core').projectDir, "/src/main/assets")
from new File(project(':desktop').projectDir,"/src/main/assets")
from new File(project(':desktop').projectDir, "/src/main/assets")
}

def osName = System.getProperty('os.name').toLowerCase(Locale.ROOT)
Expand All @@ -29,7 +29,7 @@ task debug(type: JavaExec) {
}

task release(type: Jar) {
//FIXME this is now needed as of gradle 7.0, due to our weird sourceSets setup. Should see if there's a better way to do this
// FIXME this is now needed as of gradle 7.0, due to our weird sourceSets setup. Should see if there's a better way to do this
setDuplicatesStrategy(DuplicatesStrategy.EXCLUDE)
from sourceSets.main.output
dependsOn configurations.runtimeClasspath
Expand All @@ -43,7 +43,11 @@ task release(type: Jar) {
attributes 'Implementation-Version': appVersionCode
}
}
installDist.dependsOn release

installDist {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}

startScripts.dependsOn release
jpackageImage.dependsOn release

Expand Down Expand Up @@ -95,13 +99,12 @@ runtime {
imageOptions = ["--icon", file("./src/main/assets/icons/mac.icns"),
"--java-options", "-XstartOnFirstThread",
"--java-options", "-XX:+IgnoreUnrecognizedVMOptions",
//append .apple because com.shatteredpixel.shatteredpixeldungeon was taken =(
// append .apple because com.shatteredpixel.shatteredpixeldungeon was taken =(
"--mac-package-identifier", appPackageName + ".apple",
"--mac-package-name", "ShattererdPD"]
}
}
}

}

dependencies {
Expand All @@ -113,7 +116,7 @@ dependencies {
implementation "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop"
implementation "com.badlogicgames.gdx-controllers:gdx-controllers-desktop:$gdxControllersVersion"

//we use LWJGL tinyFD directly to display crash messages
// we use LWJGL tinyFD directly to display crash messages
implementation "org.lwjgl:lwjgl-tinyfd:3.3.3"
implementation "org.lwjgl:lwjgl-tinyfd:3.3.3:natives-windows"
implementation "org.lwjgl:lwjgl-tinyfd:3.3.3:natives-macos"
Expand All @@ -123,4 +126,4 @@ dependencies {

implementation project(':services:updates:githubUpdates')
implementation project(':services:news:shatteredNews')
}
}
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-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit f36935d

Please sign in to comment.