From b42bebdee8fe42cf2e34f184f59a0b80e8e1cdf7 Mon Sep 17 00:00:00 2001 From: Mauricio Colli Date: Sun, 28 Apr 2019 17:03:19 -0300 Subject: [PATCH] Add instructions to quickly test changes in the extractor - Make use of the local Maven repository --- README.md | 11 +++++++++++ build.gradle | 8 ++++++++ 2 files changed, 19 insertions(+) diff --git a/README.md b/README.md index 715ec2fb..3cf4e4c5 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,17 @@ If you're using Gradle, you could add NewPipe Extractor as a dependency with the 1. Add `maven { url 'https://jitpack.io' }` to the `repositories` in your `build.gradle`. 2. Add `compile 'com.github.TeamNewPipe:NewPipeExtractor:v0.11.0'`the `dependencies` in your `build.gradle`. Replace `v0.11.0` with the latest release. +### Testing changes + +To test changes quickly you can build the library locally. Using the local Maven repository is a good approach, here's a gist of how to use it: + +1. Add `mavenLocal()` in your project `repositories` list (usually as the first entry to give priority above the others). +2. It's _recommended_ that you change the `version` of this library (e.g. `LOCAL_SNAPSHOT`). +3. Run gradle's `ìnstall` task to deploy this library to your local repository (using the wrapper, present in the root of this project: `./gradlew install`) +4. Change the dependency version used in your project to match the one you chose in step 2 (`implementation 'com.github.TeamNewPipe:NewPipeExtractor:LOCAL_SNAPSHOT'`) + +> Tip for Android Studio users: After you make changes and run the `install` task, use the menu option `File → "Sync with File System"` to refresh the library in your project. + ## Supported sites The following sites are currently supported: diff --git a/build.gradle b/build.gradle index 9f25fc28..b0cdf711 100644 --- a/build.gradle +++ b/build.gradle @@ -1,15 +1,23 @@ allprojects { apply plugin: 'java-library' + apply plugin: 'maven' + sourceCompatibility = 1.7 targetCompatibility = 1.7 version 'v0.13.0' + group 'com.github.TeamNewPipe' repositories { jcenter() } } +dependencies { + implementation project(':extractor') + implementation project(':timeago-parser') +} + subprojects { task sourcesJar(type: Jar, dependsOn: classes) { classifier = 'sources'