Skip to content

Commit

Permalink
Merge pull request #15 from moosetechnology/feature/move-to-gradle
Browse files Browse the repository at this point in the history
Move to gradle, make test pass, enable CI
  • Loading branch information
badetitou authored Oct 23, 2024
2 parents a9d9f1f + d3b2b69 commit a3ca12b
Show file tree
Hide file tree
Showing 128 changed files with 15,660 additions and 10,694 deletions.
12 changes: 12 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# Linux start script should use lf
/gradlew text eol=lf

# These are Windows script files and should use crlf
*.bat text eol=crlf

# Binary files should be left untouched
*.jar binary

40 changes: 40 additions & 0 deletions .github/workflows/gradle-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Gradle Package

on:
release:
types: [created]

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4 # v4.0.0

- name: Grant execute permission to Gradle wrapper
run: chmod +x ./gradlew

- name: Build with Gradle
run: ./gradlew lib:build

# The USERNAME and TOKEN need to correspond to the credentials environment variables used in
# the publishing section of your build.gradle
- name: Publish to GitHub Packages
run: ./gradlew lib:publish
env:
USERNAME: ${{ github.actor }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
23 changes: 23 additions & 0 deletions .github/workflows/on-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Run Gradle on every push

on:
push:

jobs:
gradle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Grant execute permission to Gradle wrapper
run: chmod +x ./gradlew

- name: Execute Gradle build
run: ./gradlew lib:build
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/bin/
fame-rUnversioned directory.jar
fame-lib.jar

# Ignore Gradle project-specific cache directory
.gradle

# Ignore Gradle build output directory
build
gen
8 changes: 0 additions & 8 deletions .idea/.gitignore

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/ant.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/misc.xml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

124 changes: 0 additions & 124 deletions .idea/uiDesigner.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

28 changes: 0 additions & 28 deletions .project

This file was deleted.

4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"java.compile.nullAnalysis.mode": "automatic",
"java.configuration.updateBuildConfiguration": "automatic"
}
File renamed without changes.
66 changes: 0 additions & 66 deletions build.xml

This file was deleted.

10 changes: 10 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This file was generated by the Gradle 'init' task.
# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format

[versions]
commons-math3 = "3.6.1"
guava = "33.2.1-jre"

[libraries]
commons-math3 = { module = "org.apache.commons:commons-math3", version.ref = "commons-math3" }
guava = { module = "com.google.guava:guava", version.ref = "guava" }
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit a3ca12b

Please sign in to comment.