Skip to content

Commit

Permalink
buildscripts: eliminate "common.gradle"
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed May 22, 2024
1 parent ae4c841 commit 8adba6d
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 49 deletions.
39 changes: 35 additions & 4 deletions apps/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
// Gradle script to build the "apps" subproject of LbjExamples

// Note: "common.gradle" in the root project contains additional initialization
// for this project. This initialization is applied in the "build.gradle"
// of the root project.

plugins {
id 'application' // to build JVM applications
id 'checkstyle' // to analyze Java sourcecode for style violations
}

checkstyle {
toolVersion libs.versions.checkstyle.get()
}

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

application {
Expand All @@ -16,6 +22,31 @@ if (!hasProperty('mainClass')) {
}
jar.manifest.attributes('Main-Class': application.mainClass)

tasks.withType(JavaCompile).configureEach { // Java compile-time options:
options.compilerArgs << '-Xdiags:verbose'
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_20)) {
// Suppress warnings that source value 8 is obsolete.
options.compilerArgs << '-Xlint:-options'
}
options.compilerArgs << '-Xlint:unchecked'
options.deprecation = true // to provide detailed deprecation warnings
options.encoding = 'UTF-8'
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_1_10)) {
options.release = 8
}
}

dependencies {
implementation(libs.libbulletjme)
implementation platform(libs.lwjgl.bom)

implementation(libs.joml)
implementation(libs.lwjgl)
implementation(libs.lwjgl.assimp)
implementation(libs.lwjgl.glfw)
implementation(libs.lwjgl.opengl)
}

ext {
// which BTF (buildType + flavor) of the native physics library to copy:
//btf = 'DebugSp'
Expand Down
4 changes: 0 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ plugins {
id 'base' // to add a "clean" task to the root project
}

subprojects {
apply from: rootProject.file('common.gradle')
}

configurations.configureEach {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds' // to disable caching of snapshots
}
Expand Down
38 changes: 0 additions & 38 deletions common.gradle

This file was deleted.

6 changes: 3 additions & 3 deletions docs/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Gradle script to build the "docs" subproject of LbjExamples

// Note: "common.gradle" in the root project contains additional initialization
// for this project. This initialization is applied in the "build.gradle"
// of the root project.
plugins {
id 'java'
}

sourceSets.main.java {
srcDir 'en' // for IDE access (no Java there)
Expand Down

0 comments on commit 8adba6d

Please sign in to comment.