From 1ba689900e0e0e5c3d17375445b7d85d92fe9435 Mon Sep 17 00:00:00 2001 From: FireMasterK <20838718+FireMasterK@users.noreply.github.com> Date: Sun, 27 Dec 2020 19:45:41 +0530 Subject: [PATCH 1/3] Migrate to GitHub actions from Travis. --- .github/workflows/ci.yml | 29 +++++++++++++++++++++++++++++ .github/workflows/docs.yml | 33 +++++++++++++++++++++++++++++++++ .travis.yml | 14 -------------- README.md | 2 +- 4 files changed, 63 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/docs.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..960937408 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +name: CI + +on: + push: + branches: + - dev + - master + pull_request: + +jobs: + build-and-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: set up JDK 1.8 + uses: actions/setup-java@v1.4.3 + with: + java-version: 1.8 + + - name: Cache Gradle dependencies + uses: actions/cache@v2 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} + restore-keys: ${{ runner.os }}-gradle + + - name: Build and run Tests + run: ./gradlew check --stacktrace diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 000000000..da44ae983 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,33 @@ +name: Build and deploy JavaDocs + +on: + push: + branches: + - master + +jobs: + build-and-deploy-docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: set up JDK 1.8 + uses: actions/setup-java@v1.4.3 + with: + java-version: 1.8 + + - name: Cache Gradle dependencies + uses: actions/cache@v2 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} + restore-keys: ${{ runner.os }}-gradle + + - name: Build JavaDocs + run: ./gradlew aggregatedJavadocs + + - name: Deploy JavaDocs + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./build/docs diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 137cf3e20..000000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: java -jdk: - - openjdk8 - -script: - - ./gradlew check aggregatedJavadocs - -deploy: - provider: pages - skip_cleanup: true - github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard - local_dir: build/docs - on: - branch: master diff --git a/README.md b/README.md index 8b074bf0d..36e33583a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # NewPipe Extractor -[![Build Status](https://travis-ci.org/TeamNewPipe/NewPipeExtractor.svg?branch=master)](https://travis-ci.org/TeamNewPipe/NewPipeExtractor) [![JIT Pack Badge](https://jitpack.io/v/TeamNewPipe/NewPipeExtractor.svg)](https://jitpack.io/#TeamNewPipe/NewPipeExtractor) [JDoc](https://teamnewpipe.github.io/NewPipeExtractor/javadoc/) • [Documentation](https://teamnewpipe.github.io/documentation/) +[![Build Status](https://github.com/TeamNewPipe/NewPipeExtractor/workflows/CI/badge.svg?branch=dev&event=push)](https://github.com/TeamNewPipe/NewPipeExtractor/actions) [![JIT Pack Badge](https://jitpack.io/v/TeamNewPipe/NewPipeExtractor.svg)](https://jitpack.io/#TeamNewPipe/NewPipeExtractor) [JDoc](https://teamnewpipe.github.io/NewPipeExtractor/javadoc/) • [Documentation](https://teamnewpipe.github.io/documentation/) NewPipe Extractor is a library for extracting things from streaming sites. It is a core component of [NewPipe](https://github.com/TeamNewPipe/NewPipe), but could be used independently. From d63d20f94354ade24dc0b163c9b9ba395f11dea5 Mon Sep 17 00:00:00 2001 From: TobiGr Date: Thu, 31 Dec 2020 17:44:12 +0100 Subject: [PATCH 2/3] Fix JDoc --- .../extractor/linkhandler/SearchQueryHandlerFactory.java | 1 - .../linkHandler/YoutubePlaylistLinkHandlerFactory.java | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/linkhandler/SearchQueryHandlerFactory.java b/extractor/src/main/java/org/schabi/newpipe/extractor/linkhandler/SearchQueryHandlerFactory.java index 50977e20c..efd5ad022 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/linkhandler/SearchQueryHandlerFactory.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/linkhandler/SearchQueryHandlerFactory.java @@ -42,7 +42,6 @@ public abstract class SearchQueryHandlerFactory extends ListLinkHandlerFactory { * It's not mandatory for NewPipe to handle the Url * * @param url - * @return */ @Override public boolean onAcceptUrl(String url) { diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/linkHandler/YoutubePlaylistLinkHandlerFactory.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/linkHandler/YoutubePlaylistLinkHandlerFactory.java index 6867041f1..9ed2ae775 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/linkHandler/YoutubePlaylistLinkHandlerFactory.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/linkHandler/YoutubePlaylistLinkHandlerFactory.java @@ -76,9 +76,8 @@ public class YoutubePlaylistLinkHandlerFactory extends ListLinkHandlerFactory { } /** - * * If it is a mix (auto-generated playlist) URL, return a {@link LinkHandler} where the URL is - * like - * https://youtube.com/watch?v=videoId&list=playlistId. + * If it is a mix (auto-generated playlist) URL, return a {@link LinkHandler} where the URL is like + * {@code https://youtube.com/watch?v=videoId&list=playlistId} *

Otherwise use super

*/ @Override From 4671e683046e55633de1b2edf18045bd941fb666 Mon Sep 17 00:00:00 2001 From: TobiGr Date: Thu, 31 Dec 2020 17:55:37 +0100 Subject: [PATCH 3/3] Update links to Java SE components to Java SE 8 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index e33978c51..a62ca0d05 100644 --- a/build.gradle +++ b/build.gradle @@ -43,7 +43,7 @@ task aggregatedJavadocs(type: Javadoc, group: 'Documentation') { destinationDir = file("$buildDir/docs/javadoc") title = "$project.name $version" // options.memberLevel = JavadocMemberLevel.PRIVATE - options.links 'https://docs.oracle.com/javase/7/docs/api/' + options.links 'https://docs.oracle.com/javase/8/docs/api/' options.encoding 'UTF-8' subprojects.each { project ->