Skip to content

Commit 981171e

Browse files
committed
Fix dependency issue for Maven package
1 parent 7b4219f commit 981171e

5 files changed

Lines changed: 49 additions & 29 deletions

File tree

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,32 @@ If you have any questions, please contact [hello@listennotes.com](hello@listenno
1111

1212
<a href="https://www.listennotes.com/api/"><img src="https://raw.githubusercontent.com/ListenNotes/ListenApiDemo/master/web/src/powered_by_listennotes.png" width="300" /></a>
1313

14+
## Installation
15+
16+
### Requirements
17+
18+
- Java 1.8 or later
19+
20+
### Gradle users
21+
22+
Add this dependency to your project's build file:
23+
24+
```groovy
25+
implementation "com.listennotes:podcast-api:1.0.4"
26+
```
27+
28+
### Maven users
29+
30+
Add this dependency to your project's POM:
31+
32+
```xml
33+
<dependency>
34+
<groupId>com.listennotes</groupId>
35+
<artifactId>podcast-api</artifactId>
36+
<version>1.0.4</version>
37+
</dependency>
38+
```
39+
1440
## Development
1541

1642
```sh

build.gradle

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
plugins {
66
id 'application'
7-
id 'java'
7+
id 'java-library'
88
id 'maven-publish'
99
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
1010
id("org.jetbrains.dokka") version "1.4.32"
@@ -16,19 +16,12 @@ repositories {
1616
}
1717

1818
dependencies {
19-
implementation 'org.json:json:20210307'
19+
api 'org.json:json:20210307'
2020
testImplementation 'junit:junit:3.8.1'
2121
}
2222

23-
java.sourceCompatibility = JavaVersion.VERSION_1_8
24-
25-
publishing {
26-
publications {
27-
maven(MavenPublication) {
28-
from(components.java)
29-
}
30-
}
31-
}
23+
sourceCompatibility = JavaVersion.VERSION_1_8
24+
targetCompatibility = JavaVersion.VERSION_1_8
3225

3326
// ==================
3427
// Java Compiler

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
GROUP_ID=com.listennotes
2-
VERSION_NAME=1.0.1
2+
VERSION_NAME=1.0.4
33

44
POM_URL=https://github.com/ListenNotes/podcast-api-java
55
POM_SCM_URL=git@github.com:ListenNotes/podcast-api-java.git

scripts/publish-root.gradle

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,17 @@ group = GROUP_ID
6060
version = VERSION_NAME
6161
description = POM_DESCRIPTION
6262

63-
afterEvaluate {
64-
publishing {
65-
publications {
66-
release(MavenPublication) {
63+
publishing {
64+
publications {
65+
release(MavenPublication) {
66+
from(components.java)
6767
// The coordinates of the library, being set from variables that
6868
// we'll set up later
6969
groupId GROUP_ID
7070
artifactId POM_ARTIFACT_ID
7171
version VERSION_NAME
7272

73-
artifact("$buildDir/libs/${project.getName()}-${version}.jar")
73+
// artifact("$buildDir/libs/${project.getName()}-${version}.jar")
7474

7575
artifact sourcesJar
7676
artifact javadocJar
@@ -94,16 +94,17 @@ afterEvaluate {
9494
}
9595
}
9696

97-
// Version control info - if you're using GitHub, follow the
98-
// format as seen here
99-
scm {
97+
// Version control info - if you're using GitHub, follow the
98+
// format as seen here
99+
scm {
100100
connection = POM_SCM_CONNECTION
101101
developerConnection = POM_SCM_DEV_CONNECTION
102102
url = POM_URL
103103
}
104-
}
105-
}
106-
}
104+
105+
106+
}
107+
}
107108
}
108109
}
109110

settings.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ include (
88
':podcast-api',
99
)
1010

11-
buildCache {
12-
local {
13-
enabled = true
14-
removeUnusedEntriesAfterDays = 7
15-
}
16-
}
11+
// buildCache {
12+
// local {
13+
// enabled = true
14+
// removeUnusedEntriesAfterDays = 7
15+
// }
16+
// }

0 commit comments

Comments
 (0)