Skip to content

Commit

Permalink
Configure publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
lucko committed Dec 8, 2024
1 parent 3938f6f commit fbead45
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
uses: gradle/gradle-build-action@v2

- name: Run build and tests with Gradle wrapper
run: ./gradlew test build
run: ./gradlew test build PdockerTests

- name: Publish test report
uses: mikepenz/action-junit-report@v3
Expand Down
29 changes: 23 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,32 @@ Add a dependency to your Maven/Gradle buildscript:
e.g.

```groovy
compileOnly 'net.luckperms:rest-api-client:0.1'
repositories {
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots'
}
}
dependencies {
implementation 'net.luckperms:rest-api-java-client:0.1-SNAPSHOT'
}
```

```xml
<dependency>
<groupId>net.luckperms</groupId>
<artifactId>rest-api-client</artifactId>
<version>0.1</version>
</dependency>
<repositories>
<repository>
<id>sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>net.luckperms</groupId>
<artifactId>rest-api-java-client</artifactId>
<version>0.1-SNAPSHOT</version>
</dependency>
</dependencies>
```

Then, create a new client and start making calls:
Expand Down
16 changes: 13 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ version = '0.1-SNAPSHOT'


java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
//toolchain {
// languageVersion = JavaLanguageVersion.of(11)
//}

sourceCompatibility = '1.8'
targetCompatibility = '1.8'
Expand All @@ -27,6 +27,7 @@ repositories {
}

test {
onlyIf { project.hasProperty('dockerTests') }
useJUnitPlatform()
testLogging {
events = [TestLogEvent.PASSED, TestLogEvent.FAILED, TestLogEvent.SKIPPED]
Expand Down Expand Up @@ -60,6 +61,15 @@ dependencies {
}

publishing {
//repositories {
// maven {
// url = 'https://oss.sonatype.org/content/repositories/snapshots'
// credentials {
// username = sonatypeUsername
// password = sonatypePassword
// }
// }
//}
publications {
mavenJava(MavenPublication) {
from components.java
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1 @@
rootProject.name = 'rest-api-client'
rootProject.name = 'rest-api-java-client'

0 comments on commit fbead45

Please sign in to comment.