Skip to content

Commit

Permalink
Merge pull request #22 from xdev-software/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
AB-xdev authored Jan 19, 2024
2 parents 291659c + 90c35f0 commit b11f2a2
Show file tree
Hide file tree
Showing 20 changed files with 352 additions and 426 deletions.
141 changes: 141 additions & 0 deletions .config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<!-- Only check code -->
<property name="fileExtensions" value="java"/>
<property name="severity" value="error"/>

<property name="tabWidth" value="4"/>

<module name="SuppressionFilter">
<property name="file" value=".config/checkstyle/suppressions.xml"/>
</module>

<module name="FileLength"/>
<module name="LineLength">
<property name="max" value="120"/>
<property name="fileExtensions" value="java"/>
<!-- Ignore default + links in comments -->
<property name="ignorePattern" value="(^(package|import))|(^\s*(\/\/|\*) .*https?.*$)"/>
</module>
<module name="NewlineAtEndOfFile"/>

<module name="RegexpSingleline">
<!-- Ignore inside block comments (*) -->
<property name="format" value="[^\s\*][\s]{1,}$"/>
<property name="minimum" value="0"/>
<property name="maximum" value="0"/>
<property name="message" value="Line has trailing whitespaces"/>
</module>

<!-- Generated code -->
<module name="SuppressionSingleFilter">
<property name="checks" value="."/>
<property name="files" value="[\\/](src)?gen[\\/].*\.java$"/>
</module>
<module name="SuppressionSingleFilter">
<property name="checks" value="."/>
<property name="files" value="[\\/]src[\\/]gen(erated)?[\\/].*\.java$"/>
</module>
<!-- Test code -->
<module name="SuppressionSingleFilter">
<property name="checks" value="MagicNumberCheck"/>
<property name="files" value="[\\/]test[\\/].*\.java$"/>
</module>
<module name="SuppressWarningsFilter"/>

<module name="TreeWalker">
<!-- Checks - sorted alphabetically -->
<module name="ArrayTypeStyle"/>
<module name="AvoidStarImport"/>
<module name="ConstantName"/>
<module name="DefaultComesLast"/>
<module name="EmptyBlock"/>
<module name="EmptyCatchBlock"/>
<module name="EmptyForInitializerPad"/>
<module name="EmptyForIteratorPad"/>
<module name="EmptyStatement"/>
<module name="EqualsHashCode"/>
<module name="ExplicitInitialization">
<property name="severity" value="info"/>
</module>
<module name="FinalClass"/>
<module name="FinalParameters"/>
<module name="GenericWhitespace"/>
<module name="HideUtilityClassConstructor"/>
<module name="IllegalImport"/>
<module name="InterfaceIsType"/>
<module name="JavadocStyle">
<property name="checkFirstSentence" value="false"/>
</module>
<module name="LeftCurly">
<!-- Default minus Lambda -->
<property name="tokens" value="ANNOTATION_DEF, CLASS_DEF, CTOR_DEF, ENUM_CONSTANT_DEF, ENUM_DEF, INTERFACE_DEF, LITERAL_CASE, LITERAL_CATCH, LITERAL_DEFAULT, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, METHOD_DEF, OBJBLOCK, STATIC_INIT, RECORD_DEF, COMPACT_CTOR_DEF"/>
<property name="option" value="nl"/>
</module>
<module name="LocalFinalVariableName"/>
<module name="LocalVariableName"/>
<module name="MagicNumber">
<property name="ignoreAnnotation" value="true"/>
<property name="ignoreFieldDeclaration" value="true"/>
<property name="ignoreHashCodeMethod" value="true"/>
<!-- Defaults + other common constant values (e.g. time) -->
<property name="ignoreNumbers" value="-1, 0, 1, 2, 3, 4, 5, 10, 12, 24, 31, 60, 100, 1000"/>
</module>
<module name="MemberName"/>
<module name="MethodLength"/>
<module name="MethodName"/>
<module name="MethodParamPad"/>
<module name="MissingDeprecated"/>
<module name="MissingOverride"/>
<module name="MissingSwitchDefault"/>
<module name="ModifierOrder"/>
<module name="NeedBraces"/>
<module name="NoClone"/>
<module name="NoFinalizer"/>
<module name="NonEmptyAtclauseDescription"/>
<module name="NoWhitespaceAfter"/>
<module name="NoWhitespaceBefore"/>
<module name="OneStatementPerLine"/>
<module name="OneTopLevelClass"/>
<module name="OperatorWrap"/>
<module name="OuterTypeNumber"/>
<module name="PackageName"/>
<module name="ParameterName"/>
<module name="ParenPad"/>
<module name="RedundantImport"/>
<module name="RequireThis"/>
<module name="RightCurly">
<property name="option" value="alone"/>
</module>
<module name="SimplifyBooleanExpression"/>
<module name="StaticVariableName"/>
<module name="StringLiteralEquality"/>
<module name="SuppressWarningsHolder"/>
<module name="TodoComment">
<property name="severity" value="info"/>
</module>
<module name="TypecastParenPad"/>
<module name="TypeName"/>
<module name="UnusedImports"/>
<module name="UpperEll"/>
<module name="VisibilityModifier">
<property name="packageAllowed" value="true"/>
<property name="protectedAllowed" value="true"/>
</module>
<module name="WhitespaceAfter">
<property name="tokens" value="COMMA,SEMI"/>
</module>
<module name="WhitespaceAround">
<property name="tokens"
value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,COLON,DIV,DIV_ASSIGN,EQUAL,GE,GT,LAND,LCURLY,LE,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS,PLUS_ASSIGN,QUESTION,RCURLY,SL,SLIST,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN,TYPE_EXTENSION_AND"/>
</module>

<!-- Filter -->
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="\s*CHECKSTYLE:OFF\s*[^\s]{1,}"/>
<property name="onCommentFormat" value="\s*CHECKSTYLE:ON"/>
</module>
</module>
</module>
6 changes: 6 additions & 0 deletions .config/checkstyle/suppressions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0"?>
<!DOCTYPE suppressions PUBLIC
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
"https://checkstyle.org/dtds/suppressions_1_2.dtd">
<suppressions>
</suppressions>
33 changes: 30 additions & 3 deletions .github/workflows/checkBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,16 @@ on:
branches: [ develop ]
paths-ignore:
- '**.md'
- '.config/**'
- '.idea/**'
- 'assets/**'
pull_request:
branches: [ develop ]
paths-ignore:
- '**.md'
- '.config/**'
- '.idea/**'
- 'assets/**'

env:
PRIMARY_MAVEN_MODULE: ${{ github.event.repository.name }}
Expand All @@ -21,14 +27,14 @@ jobs:

strategy:
matrix:
java: [17]
java: [17, 21]
distribution: [temurin]

steps:
- uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java }}
Expand Down Expand Up @@ -56,8 +62,29 @@ jobs:
fi
- name: Upload demo files
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: demo-files-java-${{ matrix.java }}
path: ${{ env.DEMO_MAVEN_MODULE }}/target/${{ env.DEMO_MAVEN_MODULE }}.jar
if-no-files-found: error

code-style:
runs-on: ubuntu-latest

strategy:
matrix:
java: [17]
distribution: [temurin]

steps:
- uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java }}
cache: 'maven'

- name: Run Checkstyle
run: mvn -B checkstyle:check -P checkstyle -T2C
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
Add the following lines to your pom:
```XML
<dependency>
<groupId>com.xdev-software</groupId>
<groupId>software.xdev</groupId>
<artifactId>${{ env.PRIMARY_MAVEN_MODULE }}</artifactId>
<version>${{ steps.version.outputs.release }}</version>
</dependency>
Expand All @@ -120,7 +120,7 @@ jobs:
git pull
- name: Set up JDK Apache Maven Central
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with: # running setup-java again overwrites the settings.xml
java-version: '17'
distribution: 'temurin'
Expand All @@ -133,8 +133,8 @@ jobs:
- name: Publish to Apache Maven Central
run: mvn -B deploy -Possrh
env:
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
MAVEN_CENTRAL_USERNAME: ${{ secrets.S01_OSS_SONATYPE_MAVEN_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.S01_OSS_SONATYPE_MAVEN_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}

Expand All @@ -152,7 +152,7 @@ jobs:
git pull
- name: Setup - Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
Expand All @@ -163,7 +163,7 @@ jobs:
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}

- name: Upload licenses - Upload Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dependencies-licenses
path: ${{ env.PRIMARY_MAVEN_MODULE }}/target/site
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ on:
branches: [ develop ]
paths-ignore:
- '**.md'
- '.config/**'
- '.idea/**'
- 'assets/**'
- 'config/**'
pull_request:
types: [opened, synchronize, reopened]
paths-ignore:
- '**.md'
- '.config/**'
- '.idea/**'
- 'assets/**'
- 'config/**'

env:
SONARCLOUD_ORG: ${{ github.event.organization.login }}
Expand All @@ -31,20 +33,20 @@ jobs:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis

- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17

- name: Cache SonarCloud packages
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar

- name: Cache Maven packages
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v4

- name: Set up JDK OSSRH
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with: # running setup-java again overwrites the settings.xml
distribution: 'temurin'
java-version: '17'
Expand All @@ -27,6 +27,6 @@ jobs:
run: mvn -B deploy -Possrh
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
env:
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
MAVEN_CENTRAL_USERNAME: ${{ secrets.S01_OSS_SONATYPE_MAVEN_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.S01_OSS_SONATYPE_MAVEN_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
3 changes: 1 addition & 2 deletions .github/workflows/update-from-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,8 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh_pr_up() {
gh pr create "$@" || gh pr edit "$@"
gh pr create -H "${{ env.UPDATE_BRANCH }}" "$@" || (git checkout "${{ env.UPDATE_BRANCH }}" && gh pr edit "$@")
}
gh_pr_up -B "${{ steps.main.outputs.current_branch }}" \
-H "${{ env.UPDATE_BRANCH }}" \
--title "Update from template" \
--body "An automated PR to sync changes from the template into this repo"
4 changes: 2 additions & 2 deletions .idea/checkstyle-idea.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions .run/Run Demo.run.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run Demo" type="Application" factoryName="Application">
<option name="ALTERNATIVE_JRE_PATH" value="BUNDLED" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<option name="MAIN_CLASS_NAME" value="software.xdev.eclipse.store.App" />
<option name="MAIN_CLASS_NAME" value="software.xdev.Application" />
<module name="eclipse-store-afs-ibm-cos-demo" />
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
<extension name="coverage">
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.0.1
* ⚠️ GroupId changed from ``com.xdev-software`` to ``software.xdev``
* Updated dependencies

## 1.0.0

Using v1.0.0 of EclipseStore now.
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ We also encourage you to read the [contribution instructions by GitHub](https://
### Software Requirements
You should have the following things installed:
* Git
* Java 17 - should be as unmodified as possible (Recommended: [Eclipse Adoptium](https://adoptium.net/temurin/releases/))
* Java 21 - should be as unmodified as possible (Recommended: [Eclipse Adoptium](https://adoptium.net/temurin/releases/))
* Maven

### Recommended setup
Expand Down
Loading

0 comments on commit b11f2a2

Please sign in to comment.