Skip to content

Commit

Permalink
Rewrite the build system. (#219)
Browse files Browse the repository at this point in the history
This heavily relies on buildSrc and conventions to unify most of the build architecture. Versions are now externally defined via TOML file. Style is enforced via Spotless, but styling has not been applied to any files not touched by this commit. Documentation is now a gradle project with custom Jekyll build and serve tasks.
  • Loading branch information
no-preserve-root authored Feb 21, 2022
1 parent 1de0daa commit f116916
Show file tree
Hide file tree
Showing 78 changed files with 1,811 additions and 1,202 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 6,10 @@ name: Build
on:
push:
paths-ignore:
- 'docs/**'
- 'bgw-docs/**'
pull_request:
paths-ignore:
- 'docs/**'
- 'bgw-docs/**'
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 26,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Copy docs to legacy location
run: cp -r ./bgw-docs/src/main/jekyll ./docs

- name: Set up JDK
uses: actions/setup-java@v1
with:
Expand Down
14 changes: 0 additions & 14 deletions LICENSE-HEADER.txt

This file was deleted.

20 changes: 20 additions & 0 deletions bgw-docs/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 1,20 @@
/*
* Copyright 2021-2022 The BoardGameWork Authors
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

plugins { id("tools.aqua.bgw.jekyll-conventions") }

dependencies { includedKDoc(project(":bgw-gui", "kdoc")) }
2 changes: 2 additions & 0 deletions bgw-docs/src/main/jekyll/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 1,2 @@
source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins
1 change: 1 addition & 0 deletions bgw-docs/src/main/jekyll/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 1 @@
remote_theme: pmarsceill/just-the-docs
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
42 changes: 23 additions & 19 deletions bgw-examples/bgw-docs-examples/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,25 1,29 @@
@file:Suppress("SpellCheckingInspection")
/*
* Copyright 2022 The BoardGameWork Authors
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins { id("tools.aqua.bgw.executable-conventions") }

plugins {
kotlin("jvm")
}

group = "tools.aqua"
version = rootProject.version

repositories {
mavenCentral()
mavenMetadata {
name.set("BoardGameWork Docs Examples")
description.set("The BGW documentation examples.")
}

dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation(project(":bgw-gui"))
implementation(project(":bgw-net:bgw-net-common"))
implementation(project(":bgw-net:bgw-net-client"))
implementation(project(":bgw-gui"))
implementation(project(":bgw-net:bgw-net-client"))
implementation(project(":bgw-net:bgw-net-common"))
}

tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "11"
}
42 changes: 24 additions & 18 deletions bgw-examples/bgw-maumau-example/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,25 1,31 @@
@file:Suppress("SpellCheckingInspection")
/*
* Copyright 2022 The BoardGameWork Authors
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins { id("tools.aqua.bgw.executable-conventions") }

plugins {
kotlin("jvm")
}

group = "tools.aqua"
version = rootProject.version

repositories {
mavenCentral()
mavenMetadata {
name.set("BoardGameWork MauMau Example")
description.set("The BGW MauMau example.")
}

dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation(project(":bgw-gui"))
implementation(project(":bgw-net:bgw-net-common"))
implementation(project(":bgw-net:bgw-net-client"))
implementation(project(":bgw-gui"))
implementation(project(":bgw-net:bgw-net-client"))
implementation(project(":bgw-net:bgw-net-common"))
}

tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "11"
}
application { mainClass.set("tools.aqua.bgw.examples.maumau.main.MainKt") }
40 changes: 22 additions & 18 deletions bgw-examples/bgw-sudoku-example/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,23 1,27 @@
@file:Suppress("SpellCheckingInspection")
/*
* Copyright 2022 The BoardGameWork Authors
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins { id("tools.aqua.bgw.executable-conventions") }

plugins {
kotlin("jvm")
mavenMetadata {
name.set("BoardGameWork Sudoku Example")
description.set("The BGW Sudoku example.")
}

group = "tools.aqua"
version = rootProject.version
dependencies { implementation(project(":bgw-gui")) }

repositories {
mavenCentral()
}

dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation(project(":bgw-gui"))
}

tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "11"
}
application { mainClass.set("tools.aqua.bgw.examples.sudoku.main.MainKt") }
40 changes: 22 additions & 18 deletions bgw-examples/bgw-tetris-example/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,23 1,27 @@
@file:Suppress("SpellCheckingInspection")
/*
* Copyright 2022 The BoardGameWork Authors
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins { id("tools.aqua.bgw.executable-conventions") }

plugins {
kotlin("jvm")
mavenMetadata {
name.set("BoardGameWork Tetris Example")
description.set("The BGW Tetris example.")
}

group = "tools.aqua"
version = rootProject.version
dependencies { implementation(project(":bgw-gui")) }

repositories {
mavenCentral()
}

dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation(project(":bgw-gui"))
}

tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "11"
}
application { mainClass.set("tools.aqua.bgw.examples.tetris.main.MainKt") }
Loading

0 comments on commit f116916

Please sign in to comment.