Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* text=auto
gradlew text eol=lf
*.bat text eol=crlf whitespace=cr-at-eol
51 changes: 29 additions & 22 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,35 @@
# 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://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: Java CI

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]

branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
build:

runs-on: ubuntu-latest

test:
strategy:
fail-fast: false
matrix:
java: ['17', '25']
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v2
with:
java-version: '21'
distribution: 'adopt'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew test
- uses: actions/checkout@v6.1.0
- uses: actions/setup-java@v6.0.0
with:
distribution: temurin
java-version: ${{ matrix.java }}
- uses: gradle/actions/setup-gradle@v6.2.0
- run: ./gradlew --no-daemon check jar sourcesJar plainJavadocJar generatePomFileForMavenPublication
- run: bash scripts/verify-package.sh
public-mock:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6.1.0
- uses: actions/setup-java@v6.0.0
with:
distribution: temurin
java-version: '25'
- uses: gradle/actions/setup-gradle@v6.2.0
- run: ./gradlew --no-daemon integrationTest
3 changes: 0 additions & 3 deletions .vscode/settings.json

This file was deleted.

13,669 changes: 639 additions & 13,030 deletions README.md

Large diffs are not rendered by default.

85 changes: 43 additions & 42 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,64 +1,65 @@
/*
* This file was generated by the Gradle 'init' task.
*/

plugins {
id 'application'
id 'java-library'
id 'maven-publish'
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
id("org.jetbrains.dokka") version "1.4.32"
id 'com.vanniktech.maven.publish' version '0.36.0'
}

repositories {
mavenLocal()
mavenCentral()
}
group = GROUP_ID
version = VERSION_NAME
description = POM_DESCRIPTION

repositories { mavenCentral() }

dependencies {
api 'org.json:json:20210307'
testImplementation 'junit:junit:3.8.1'
api 'org.json:json:20260719'
testImplementation platform('org.junit:junit-bom:6.1.2')
testImplementation 'org.junit.jupiter:junit-jupiter'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
dependencyLocking { lockAllConfigurations() }

// ==================
// Java Compiler
// ==================
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:all" << "-Xlint:-options" << "-Xlint:-processing"
tasks.withType(JavaCompile).configureEach {
options.release = 17
options.encoding = 'UTF-8'
options.compilerArgs += ['-Xlint:all', '-Werror']
}

compileJava {
options.compilerArgs << "-Werror"
tasks.withType(Javadoc).configureEach {
options.encoding = 'UTF-8'
options.addStringOption('Xdoclint:all,-missing', '-quiet')
}

// ==================
// Tasks
// ==================

// Run sample app:
// $ gradle run -q
application {
mainClass = 'com.listennotes.podcast_api.Sample'
tasks.named('test') {
dependsOn jar
useJUnitPlatform { excludeTags 'integration' }
systemProperty 'sdk.root', projectDir.absolutePath
doFirst {
systemProperty 'sdk.compile.classpath', files(tasks.named('jar').get().archiveFile,
configurations.runtimeClasspath).asPath
}
}

clean {
delete fileTree(dir: 'src/' , include: '**/*.class')
tasks.register('integrationTest', Test) {
description = 'Opt-in requests to the credential-free, stateless public mock only.'
group = 'verification'
testClassesDirs = sourceSets.test.output.classesDirs
classpath = sourceSets.test.runtimeClasspath
useJUnitPlatform { includeTags 'integration' }
shouldRunAfter test
}

jar {
tasks.named('jar') {
manifest {
attributes("Implementation-Title": POM_NAME,
"Implementation-Version": VERSION_NAME,
"Implementation-Vendor": VENDOR_NAME,
"Bundle-SymbolicName": POM_ARTIFACT_ID,
"Export-Package": "com.listennotes.*")

archiveVersion = VERSION_NAME
attributes('Implementation-Title': POM_NAME,
'Implementation-Version': VERSION_NAME,
'Implementation-Vendor': VENDOR_NAME,
'Automatic-Module-Name': 'com.listennotes.podcast_api')
}
}

apply from: "${rootDir}/scripts/publish-root.gradle"
mavenPublishing {
coordinates(GROUP_ID, POM_ARTIFACT_ID, VERSION_NAME)
publishToMavenCentral()
signAllPublications()
// POM_* metadata is read by the plugin from gradle.properties.
}
17 changes: 17 additions & 0 deletions gradle.lockfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
# To regenerate this file, run: ./gradlew :dependencies --write-locks
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath
org.json:json:20260719=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jspecify:jspecify:1.0.0=testCompileClasspath
org.junit.jupiter:junit-jupiter-api:6.1.2=testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-engine:6.1.2=testRuntimeClasspath
org.junit.jupiter:junit-jupiter-params:6.1.2=testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter:6.1.2=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-commons:6.1.2=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-engine:6.1.2=testRuntimeClasspath
org.junit.platform:junit-platform-launcher:6.1.2=testRuntimeClasspath
org.junit:junit-bom:6.1.2=testCompileClasspath,testRuntimeClasspath
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testRuntimeClasspath
empty=annotationProcessor,testAnnotationProcessor
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
GROUP_ID=com.listennotes
VERSION_NAME=1.1.6
VERSION_NAME=3.0.0

POM_URL=https://github.com/ListenNotes/podcast-api-java
POM_SCM_URL=git@github.com:ListenNotes/podcast-api-java.git
POM_SCM_URL=https://github.com/ListenNotes/podcast-api-java
POM_SCM_CONNECTION=scm:git:git@github.com:ListenNotes/podcast-api-java.git
POM_SCM_DEV_CONNECTION=scm:git:git@github.com:ListenNotes/podcast-api-java.git
POM_LICENCE_NAME=The MIT License
POM_LICENCE_URL=https://opensource.org/licenses/MIT
POM_LICENCE_DIST=repo
POM_DEVELOPER_ID=listennotes
POM_DEVELOPER_NAME=Listen Notes, Inc.
POM_DEVELOPER_EMAIL=hello+java@listennotes.com
POM_DEVELOPER_EMAIL=hello@listennotes.com

POM_DESCRIPTION=The Official Java library for the Listen Notes Podcast API. Simple & no-nonsense podcast search, directory, and insights API.
POM_NAME=Podcast Search and Directory API
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 6 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip
distributionSha256Sum=acd53f1edaf02f1a8ff99879f8a34b302661a057d9b063ae9e35b552f804d20a
distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.1-bin.zip
networkTimeout=10000
retries=0
retryBackOffMs=500
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
54 changes: 34 additions & 20 deletions gradlew

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

Loading