Skip to content

Commit 8cce3b8

Browse files
authored
Testing (#28)
1 parent 4c387d8 commit 8cce3b8

11 files changed

Lines changed: 446 additions & 14 deletions

File tree

.github/workflows/build.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Publish hjson-java releases on Maven
2+
on:
3+
release:
4+
types: [published]
5+
jobs:
6+
publish:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
- name: Set up Java
11+
uses: actions/setup-java@v3
12+
with:
13+
distribution: 'temurin'
14+
java-version: '8'
15+
- name: Validate Gradle wrapper
16+
uses: gradle/wrapper-validation-action@ccb4328a959376b642e027874838f60f8e596de3
17+
- name: Publish package
18+
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629
19+
with:
20+
arguments: publish
21+
env:
22+
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
23+
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}

.github/workflows/test.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: test
2+
on: [push, pull_request]
3+
jobs:
4+
test:
5+
runs-on: ${{ matrix.os }}
6+
strategy:
7+
fail-fast: false
8+
matrix:
9+
os: [ubuntu-latest]
10+
steps:
11+
- uses: actions/checkout@v3
12+
- name: Set up JDK 8
13+
uses: actions/setup-java@v3
14+
with:
15+
distribution: 'temurin'
16+
java-version: '8'
17+
- run: java -version
18+
- run: ./gradlew -version
19+
- run: ./gradlew test --warning-mode all

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
.gradle/
33
build/
44

5-
gradle
6-
gradlew
7-
gradle.bat
8-
95
# IntelliJ
106
*.iml
117
.idea

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# hjson-java
22

3-
[![Build Status](https://img.shields.io/travis/hjson/hjson-java.svg?style=flat-square)](http://travis-ci.org/hjson/hjson-java)
3+
[![Build Status](https://github.com/hjson/hjson-java/workflows/test/badge.svg)](https://github.com/hjson/hjson-java/actions)
44
[![Maven Central](https://img.shields.io/maven-central/v/org.hjson/hjson.svg?style=flat-square)](http://search.maven.org/#search|ga|1|g%3A%22org.hjson%22%20a%3A%22hjson%22)
5-
[![Javadoc](https://javadoc-emblem.rhcloud.com/doc/org.hjson/hjson/badge.svg?style=flat-square&color=blue)](http://www.javadoc.io/doc/org.hjson/hjson)
5+
[![Javadoc](https://img.shields.io/badge/Javadoc-blue)](http://www.javadoc.io/doc/org.hjson/hjson)
66

77
[Hjson](https://hjson.github.io), the Human JSON. A configuration file format for humans. Relaxed syntax, fewer mistakes, more comments.
88

build.gradle

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
apply plugin: 'java'
22

3-
version = '3.0.0'
43
group = 'org.hjson'
54
description = """Hjson, the Human JSON."""
65

7-
sourceCompatibility = 1.8
8-
targetCompatibility = 1.8
6+
java {
7+
sourceCompatibility = JavaVersion.VERSION_1_8
8+
targetCompatibility = JavaVersion.VERSION_1_8
9+
}
910

1011
sourceSets {
1112
main {
@@ -24,19 +25,19 @@ sourceSets {
2425
}
2526

2627
task javadocJar(type: Jar, dependsOn: javadoc) {
27-
classifier = 'javadoc'
28+
archiveClassifier = 'javadoc'
2829
from 'build/docs/javadoc'
2930
}
3031

3132
task sourcesJar(type: Jar, dependsOn: classes) {
32-
classifier = 'sources'
33+
archiveClassifier = 'sources'
3334
from sourceSets.main.allSource
3435
}
3536

3637
jar {
3738
manifest {
3839
attributes(
39-
'Hjson-Version': version,
40+
'Hjson-Version': project.version,
4041
)
4142
}
4243
}
@@ -48,10 +49,10 @@ artifacts {
4849
}
4950

5051
task(testSuite, dependsOn: ['classes','testClasses'], type: JavaExec) {
51-
main = 'org.hjson.test.Main'
52+
mainClass = 'org.hjson.test.Main'
5253
classpath = files(sourceSets.main.runtimeClasspath, sourceSets.test.runtimeClasspath)
5354
}
5455

5556
test.dependsOn testSuite
5657

57-
apply from: 'gradle-mvn-push.gradle'
58+
//apply from: 'gradle-mvn-push.gradle'

gradle/wrapper/gradle-wrapper.jar

58.1 KB
Binary file not shown.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

gradlew

Lines changed: 234 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)