Skip to content

Commit

Permalink
Use OJ build system
Browse files Browse the repository at this point in the history
  • Loading branch information
jjohannes committed Jan 19, 2024
1 parent 28060da commit 07d8b6b
Show file tree
Hide file tree
Showing 97 changed files with 214 additions and 1,371 deletions.
77 changes: 66 additions & 11 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,73 @@
name: Build Plugin
name: "CI Build"

on: [ push, pull_request ]

jobs:
gradle-build:
check: # primes cache:
runs-on: ubuntu-latest
steps:
- name: git clone
uses: actions/[email protected]
- name: Set up JDK
uses: actions/[email protected]
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
distribution: temurin
java-version: 17
- name: gradle build
id: gradle
uses: gradle/[email protected]
java-version-file: .oj/jdk-version.txt
- uses: gradle/[email protected]
- run: "./oj check"
env:
BUILD_CACHE_USER: ${{ secrets.BUILD_CACHE_USER }}
BUILD_CACHE_PWD: ${{ secrets.BUILD_CACHE_PWD }}

test-functional:
needs: check
strategy:
matrix:
module: [app]
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
distribution: temurin
java-version-file: .oj/jdk-version.txt
- uses: gradle/[email protected]
- run: "./oj :${{ matrix.module }}:checkEndToEnd"
env:
BUILD_CACHE_USER: ${{ secrets.BUILD_CACHE_USER }}
BUILD_CACHE_PWD: ${{ secrets.BUILD_CACHE_PWD }}

package:
needs: check
strategy:
matrix:
os: [ubuntu, macos, windows]
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
distribution: temurin
java-version-file: .oj/jdk-version.txt
- uses: gradle/[email protected]
- run: "./oj assemble${{ matrix.os }}"
env:
BUILD_CACHE_USER: ${{ secrets.BUILD_CACHE_USER }}
BUILD_CACHE_PWD: ${{ secrets.BUILD_CACHE_PWD }}

build:
needs: [test-functional, package]
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
distribution: temurin
java-version-file: .oj/jdk-version.txt
- uses: gradle/[email protected]
- run: "./oj build"
env:
BUILD_CACHE_USER: ${{ secrets.BUILD_CACHE_USER }}
BUILD_CACHE_PWD: ${{ secrets.BUILD_CACHE_PWD }}
- uses: actions/[email protected]
with:
arguments: build
name: Application Packages
path: .oj/build/*/packages/*
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-rc-1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-rc-2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Empty file added .oj/gradle/platform/.gitignore
Empty file.
1 change: 1 addition & 0 deletions .oj/jdk-version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
17.0.6
3 changes: 3 additions & 0 deletions .oj/modules.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://onepiece.software/j/modules

# jakarta.activation=com.sun.activation:jakarta.activation
5 changes: 5 additions & 0 deletions .oj/patch/boms.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# https://onepiece.software/j/patch/boms

# org.openjfx\:javafx=javafx-base,javafx-graphics,javafx-controls,javafx-fxml,javafx-media,javafx-swing,javafx-web%
org.apache.poi\:poi=org.apache.poi:poi-excelant,org.apache.poi:poi-ooxml,org.apache.poi:poi-scratchpad
org.slf4j\:slf4j-parent=org.slf4j:slf4j-api,org.slf4j:slf4j-simple,org.slf4j:slf4j-nop,org.slf4j:slf4j-jdk14,org.slf4j:slf4j-log4j12,org.slf4j:slf4j-reload4j,org.slf4j:slf4j-jcl,org.slf4j:slf4j-android,org.slf4j:slf4j-ext,org.slf4j:jcl-over-slf4j,org.slf4j:log4j-over-slf4j,org.slf4j:jul-to-slf4j,org.slf4j:osgi-over-slf4j
3 changes: 3 additions & 0 deletions .oj/patch/conflicts.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://onepiece.software/j/patch/conflicts

# com.sun.activation\:jakarta.activation=jakarta.activation:jakarta.activation-api,com.sun.activation:jakarta.activation
3 changes: 3 additions & 0 deletions .oj/patch/dependencies-add.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://onepiece.software/j/patch/dependencies-add

# io.netty\:netty-common=io.projectreactor.tools:blockhound:1.0.8.RELEASE
3 changes: 3 additions & 0 deletions .oj/patch/dependencies-rm.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://onepiece.software/j/patch/dependencies-rm

com.google.guava\:guava=com.google.guava:failureaccess,com.google.guava:listenablefuture,com.google.code.findbugs:jsr305,org.checkerframework:checker-qual,com.google.errorprone:error_prone_annotations,com.google.j2objc:j2objc-annotations
3 changes: 3 additions & 0 deletions .oj/patch/features.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://onepiece.software/j/patch/features

# io.netty\:netty-transport-native-epoll=linux-x86_64,linux-aarch_64
12 changes: 12 additions & 0 deletions .oj/patch/non-modules.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# https://onepiece.software/j/patch/non-modules

# com.google.common=com.google.guava:guava
org.apache.commons.collections4=org.apache.commons:commons-collections4
org.apache.commons.codec=commons-codec:commons-codec
commons.math3=org.apache.commons:commons-math3
SparseBitSet=com.zaxxer:SparseBitSet
com.github.virtuald.curvesapi=com.github.virtuald:curvesapi
com.google.common=com.google.guava:guava
javax.annotations.jsr305=com.google.code.findbugs:jsr305
velocity.engine.core=org.apache.velocity:velocity-engine-core
org.apache.commons.lang3=org.apache.commons:commons-lang3
3 changes: 3 additions & 0 deletions .oj/patch/targets.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://onepiece.software/j/patch/targets

# org.openjfx\:javafx-base=[none|none],mac[macos|x86-64],mac-aarch64[macos|aarch64],win[windows|x86-64],linux-aarch64[linux|x86-64]
13 changes: 13 additions & 0 deletions .oj/product.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# https://onepiece.software/j/product

name=Gradle Project Setup HowTo
version=1.0
domain=example.org
modules=
targets=macos[macos|x86-64],ubuntu[linux|x86-64],windows[windows|x86-64]
classpath=false
opensource=true
javadoc=true
description=How to structure a growing Gradle project with smart dependency management?
vendor=Jendrik Johannes (onepiece.Software)
copyright=Copyright 2024, Jendrik Johannes
4 changes: 4 additions & 0 deletions .oj/productivity.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# https://onepiece.software/j/productivity

build.cache.url=https://gradle.onepiece.software:5071/cache
build.develocity.url=https://scans.gradle.com
3 changes: 3 additions & 0 deletions .oj/publishing.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://onepiece.software/j/publishing

# example=https://example.org/publishing-repository
3 changes: 3 additions & 0 deletions .oj/repositories.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://onepiece.software/j/repositories

mavenCentral=https://repo1.maven.org/maven2
7 changes: 7 additions & 0 deletions .oj/tweak/endToEndTest.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# https://onepiece.software/j/tweak/endToEndTest

test.lifecycle=checkEndToEnd
javac.jvm.options=
javac.options=
test.jvm.options=
test.parallelism=8
6 changes: 6 additions & 0 deletions .oj/tweak/main.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# https://onepiece.software/j/tweak/main

javac.jvm.options=
javac.options=
run.jvm.options=
run.app.options=
4 changes: 4 additions & 0 deletions .oj/tweak/mockApi.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# https://onepiece.software/j/tweak/mockApi

javac.jvm.options=
javac.options=
7 changes: 7 additions & 0 deletions .oj/tweak/test.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# https://onepiece.software/j/tweak/test

test.lifecycle=check
javac.jvm.options=
javac.options=
test.jvm.options=
test.parallelism=8
4 changes: 4 additions & 0 deletions .oj/tweak/testFixtures.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# https://onepiece.software/j/tweak/testFixtures

javac.jvm.options=
javac.options=
16 changes: 16 additions & 0 deletions .oj/versions.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# https://onepiece.software/j/versions

com.fasterxml.jackson.core=2.16.1
com.google.common=33.0.0-jre
jakarta.activation=1.2.2
jakarta.mail=1.6.7
jakarta.servlet=6.0.0
java.inject=1.0.5
javax.annotations.jsr305=3.0.2
org.apache.commons.compress=1.25.0
org.apache.commons.io=2.15.1
org.apache.poi.ooxml=5.2.2
org.assertj.core=3.25.1
org.junit.jupiter.api=5.10.1
org.slf4j=2.0.10
velocity.engine.core=2.3
8 changes: 5 additions & 3 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
plugins {
id("org.example.application")
id("org.example.gradlebuild.java-application-module")
id("org.example.gradlebuild.feature-mock-api")
id("org.example.gradlebuild.test-suite-end-to-end-test")
}

application {
mainModule.set("org.example.product.app")
mainClass.set("org.example.product.app.Application")
mainModule = "org.example.product.app"
mainClass = "org.example.product.app.Application"
}
Binary file removed app/resources/icon.icns
Binary file not shown.
Binary file removed app/resources/icon.ico
Binary file not shown.
Binary file removed app/resources/icon.png
Binary file not shown.
Empty file added app/resources/linux/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Empty file added app/resources/macos/icon.icns
Empty file.
Empty file added app/resources/windows/icon.ico
Empty file.
1 change: 1 addition & 0 deletions app/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @MainClass("org.example.product.app.Application")
module org.example.product.app {
exports org.example.product.app;

Expand Down
2 changes: 1 addition & 1 deletion bespin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
plugins {
id("org.example.java-library")
id("org.example.gradlebuild.java-library-module")
}
2 changes: 2 additions & 0 deletions bespin/src/test/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
open module org.example.product.bespin.test {
requires org.example.product.corellia.test.fixtures;
requires org.junit.jupiter.api;

requires /*runtime*/ org.slf4j.simple;
}
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
plugins {
id("org.example.root")
}
id("org.example.gradlebuild.root")
}
3 changes: 2 additions & 1 deletion corellia/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
plugins {
id("org.example.java-library-with-test-fixtures")
id("org.example.gradlebuild.java-library-module")
id("org.example.gradlebuild.feature-test-fixtures")
}
2 changes: 0 additions & 2 deletions corellia/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module org.example.product.corellia {
exports org.example.product.corellia;

requires transitive org.apache.poi.poi;

requires org.apache.commons.io;
requires org.apache.poi.ooxml;
}
2 changes: 1 addition & 1 deletion coruscant/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
plugins {
id("org.example.java-library-published")
id("org.example.gradlebuild.java-library-module")
}
2 changes: 2 additions & 0 deletions coruscant/src/test/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
requires org.example.product.coruscant;
requires org.assertj.core;
requires org.junit.jupiter.api;

requires /*runtime*/ org.slf4j.simple;
}
19 changes: 0 additions & 19 deletions gradle/meta-plugins/build-parameters-plugins/build.gradle.kts

This file was deleted.

5 changes: 0 additions & 5 deletions gradle/meta-plugins/plugin-analysis-plugins/build.gradle.kts

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 07d8b6b

Please sign in to comment.