Skip to content

Commit

Permalink
Merge pull request #1 from MMMMMNG/master
Browse files Browse the repository at this point in the history
[HACKTOBERFEST] Update to pi4j-v2 & Multi-Chip support
  • Loading branch information
Ro5bert authored Oct 27, 2023
2 parents 33c9f9e + 6ebf4a0 commit 0e83769
Show file tree
Hide file tree
Showing 13 changed files with 2,402 additions and 1,104 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle

name: Java CI with Gradle

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Set up dependency
uses: dawidd6/action-download-artifact@v2
with:
workflow: upload.yml
name: pi4j-mock-plugin
path: /home/runner/.m2/repository/com
- name: Build with Gradle
uses: gradle/[email protected]
with:
arguments: build
41 changes: 26 additions & 15 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,35 +1,46 @@
plugins {
id 'com.github.johnrengelman.shadow' version '5.0.0'
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'java'
}

group 'com.rrr'
version '1.3.0'

sourceCompatibility = 1.11
java {
sourceCompatibility = JavaVersion.VERSION_17
withSourcesJar()
withJavadocJar()
}

repositories {
mavenLocal {
content {
includeGroup("com.pi4j")
}
}

mavenCentral()
}

dependencies {
// testCompile group: 'junit', name: 'junit', version: '4.12'
implementation group: "com.pi4j", name: "pi4j-core", version: "1.2"
}
testImplementation(platform 'org.junit:junit-bom:5.10.0')
testImplementation 'org.junit.jupiter:junit-jupiter'

task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
testImplementation 'org.mockito:mockito-core:3.+'
testImplementation 'com.pi4j:pi4j-plugin-mock:2.3.0-SNAPSHOT'

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
testRuntimeOnly 'org.slf4j:slf4j-simple:2.0.9'
implementation 'com.pi4j:pi4j-core:2.3.0'
implementation 'org.slf4j:slf4j-api:2.0.9'
implementation 'com.pi4j:pi4j-plugin-raspberrypi:2.3.0'
implementation 'com.pi4j:pi4j-plugin-pigpio:2.3.0'
}

artifacts {
archives sourcesJar
archives javadocJar
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
}

javadoc {
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Thu Jun 27 10:17:01 PDT 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
18 changes: 17 additions & 1 deletion gradlew
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
#!/usr/bin/env sh

#
# Copyright 2015 the original author or authors.
#
# 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.
#

##############################################################################
##
## Gradle start up script for UN*X
Expand Down Expand Up @@ -28,7 +44,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
Expand Down
18 changes: 17 additions & 1 deletion gradlew.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem http://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
Expand All @@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
rootProject.name = 'mcp23s17'
rootProject.name = 'MCP23S17'

Loading

0 comments on commit 0e83769

Please sign in to comment.