228 lines
11 KiB
HTML
228 lines
11 KiB
HTML
<!DOCTYPE html>
|
|
<html class="writer-html5" lang="en" >
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<link rel="shortcut icon" href="../img/favicon.ico" />
|
|
<title>Testing Your Changes in the App - NewPipe Development Documentation</title>
|
|
<!-- local fonts -->
|
|
<link rel="stylesheet" href="../css/local_fonts.css" type="text/css" />
|
|
|
|
<link rel="stylesheet" href="../css/theme.css" type="text/css" />
|
|
<link rel="stylesheet" href="../css/theme_extra.css" type="text/css" />
|
|
<link rel="stylesheet" href="../css/theme_child.css" type="text/css" />
|
|
<!-- local code syntax highlighting -->
|
|
<link rel="stylesheet" href="../css/github.min.css" type="text/css" />
|
|
<link rel="stylesheet" href="../css/highlight.css" type="text/css" />
|
|
|
|
<script>
|
|
// Current page data
|
|
var mkdocs_page_name = "Testing Your Changes in the App";
|
|
var mkdocs_page_input_path = "04_Run_changes_in_App.md";
|
|
var mkdocs_page_url = null;
|
|
</script>
|
|
|
|
<script src="../js/jquery-2.1.1.min.js" defer></script>
|
|
<script src="../js/modernizr-2.8.3.min.js" defer></script>
|
|
<script src="../js/highlight.min.js"></script>
|
|
<script>hljs.initHighlightingOnLoad();</script>
|
|
</head>
|
|
|
|
<body class="wy-body-for-nav" role="document">
|
|
|
|
<div class="wy-grid-for-nav">
|
|
<nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
|
|
<div class="wy-side-scroll">
|
|
<div class="wy-side-nav-search">
|
|
<a href=".." class="icon icon-home"> NewPipe Development Documentation
|
|
</a><div role="search">
|
|
<form id ="rtd-search-form" class="wy-form" action="../search.html" method="get">
|
|
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" title="Type search term here" />
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="..">Welcome to the NewPipe Development Docs</a>
|
|
</li>
|
|
</ul>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="../00_Prepare_everything/">Before You Start</a>
|
|
</li>
|
|
</ul>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="../01_Concept_of_the_extractor/">Concept of the Extractor</a>
|
|
</li>
|
|
</ul>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="../02_Concept_of_LinkHandler/">Concept of the LinkHandler</a>
|
|
</li>
|
|
</ul>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="../03_Implement_a_service/">Implementing a Service</a>
|
|
</li>
|
|
</ul>
|
|
<ul class="current">
|
|
<li class="toctree-l1 current"><a class="reference internal current" href="./">Testing Your Changes in the App</a>
|
|
<ul class="current">
|
|
<li class="toctree-l2"><a class="reference internal" href="#setup-android-studio">Setup Android Studio</a>
|
|
</li>
|
|
<li class="toctree-l2"><a class="reference internal" href="#get-the-newpipe-code-and-run-it">Get the NewPipe Code and Run it.</a>
|
|
</li>
|
|
<li class="toctree-l2"><a class="reference internal" href="#run-your-changes-on-the-extractor">Run Your Changes on the Extractor</a>
|
|
<ul>
|
|
<li class="toctree-l3"><a class="reference internal" href="#using-local-folder">Using local folder</a>
|
|
</li>
|
|
<li class="toctree-l3"><a class="reference internal" href="#using-jitpack">Using JitPack</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="toctree-l2"><a class="reference internal" href="#troubleshooting">Troubleshooting</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="../05_Mock_tests/">Mock Tests</a>
|
|
</li>
|
|
</ul>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="../06_releasing/">Releasing a New NewPipe Version</a>
|
|
</li>
|
|
</ul>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="../07_release_instructions/">Release instructions for normal releases</a>
|
|
</li>
|
|
</ul>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="../08_documentation/">About This Documentation</a>
|
|
</li>
|
|
</ul>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="../09_maintainers_view/">Maintainers' Section</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
|
<nav class="wy-nav-top" role="navigation" aria-label="Mobile navigation menu">
|
|
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
|
<a href="..">NewPipe Development Documentation</a>
|
|
|
|
</nav>
|
|
<div class="wy-nav-content">
|
|
<div class="rst-content"><div role="navigation" aria-label="breadcrumbs navigation">
|
|
<ul class="wy-breadcrumbs">
|
|
<li><a href=".." class="icon icon-home" aria-label="Docs"></a> »</li>
|
|
<li class="breadcrumb-item active">Testing Your Changes in the App</li>
|
|
<li class="wy-breadcrumbs-aside">
|
|
</li>
|
|
</ul>
|
|
<hr/>
|
|
</div>
|
|
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
|
<div class="section" itemprop="articleBody">
|
|
|
|
<h1 id="testing-your-changes-in-the-app">Testing Your Changes in the App</h1>
|
|
<p>You should develop and test your changes with the JUnit environment that is
|
|
provided by the NewPipe Extractor and IDEA. If you want to try it with
|
|
the actual frontend, you need to follow these steps.</p>
|
|
<h3 id="setup-android-studio">Setup Android Studio</h3>
|
|
<p>First, you'll want to set up a working Android Studio environment. To do this,
|
|
download Studio from <a href="https://developer.android.com/studio/">developer.android.com</a>,
|
|
and follow the <a href="https://developer.android.com/studio/install">instructions</a> on how to set it up.</p>
|
|
<h3 id="get-the-newpipe-code-and-run-it">Get the NewPipe Code and Run it.</h3>
|
|
<p>In order to get it, you simply clone or download it from the current <code>dev</code> branch
|
|
<a href="https://github.com/TeamNewPipe/NewPipe/archive/dev.zip">github.com/TeamNewPipe/NewPipe.git</a>.
|
|
You can then build and run it following <a href="https://developer.android.com/studio/run/">these instructions</a>.
|
|
Also, make sure you are comfortable with <a href="https://en.droidwiki.org/wiki/Android_Debug_Bridge">adb</a> since
|
|
you might experience some trouble running your compiled app on a real device, especially under Linux, where you
|
|
sometimes have to adjust the udev rules in order to
|
|
<a href="https://www.janosgyerik.com/adding-udev-rules-for-usb-debugging-android-devices/">make your device accessible</a>.</p>
|
|
<h3 id="run-your-changes-on-the-extractor">Run Your Changes on the Extractor</h3>
|
|
<p>There are several ways to test your extractor version in NewPipe. We will show you the most convenient ones:</p>
|
|
<h4 id="using-local-folder">Using local folder</h4>
|
|
<p>In NewPipe app root folder, edit <a href="https://github.com/TeamNewPipe/NewPipe/blob/dev/settings.gradle">settings.gradle</a> file and add this:</p>
|
|
<pre><code>includeBuild('../NewPipeExtractor') {
|
|
dependencySubstitution {
|
|
substitute module('com.github.TeamNewPipe:NewPipeExtractor') with project(':extractor')
|
|
}
|
|
}
|
|
</code></pre>
|
|
<p><code>includeBuild</code> should have the relative path as argument. <code>../NewPipeExtractor</code> means one folder up in hierarchy,
|
|
and the folder is exactly named <code>NewPipeExtractor</code>. If that's not the case, edit this part.</p>
|
|
<h4 id="using-jitpack">Using JitPack</h4>
|
|
<p>Another way is to use <a href="https://jitpack.io">JitPack</a>. This is a build service that can build
|
|
maven *.jar packages for Android and Java based on GitHub or GitLab repositories. </p>
|
|
<p>To use the extractor through JitPack, you need to push it to your online repository of
|
|
your copy that you host either on <a href="https://github.com">GitHub</a> or <a href="https://gitlab.com">GitLab</a>. It's important to host
|
|
it on one of both. To copy your repository URL in HTTP format, go to <a href="https://jitpack.io/">JitPack</a> and paste it there.
|
|
From here, you can grab the latest commit via <code>GET IT</code> button.
|
|
I recommend not to use a SNAPSHOT, since I am not sure when snapshot is built. An "implementation" string will be generated
|
|
for you. Copy this string and replace the <code>implementation 'com.github.TeamNewPipe:NewPipeExtractor:<commit>'</code> line in
|
|
the file <a href="https://github.com/TeamNewPipe/NewPipe/blob/dev/app/build.gradle#L58">/app/build.gradle</a> with it.</p>
|
|
<video width="600" controls>
|
|
<source src="../media/how_to_jitpack.mp4" type="video/mp4">
|
|
Your browser does not support the video tag.
|
|
</video>
|
|
|
|
<p>If everything synced well, then you should only see a screen with OK signs. Now you can compile and run NewPipe
|
|
with the new extractor.</p>
|
|
<p><img alt="image_sync_ok" src="../img/sync_ok.png" /></p>
|
|
<h3 id="troubleshooting">Troubleshooting</h3>
|
|
<p>If something went wrong on JitPack site, you can check their build log, by selecting the commit you tried to build and
|
|
click on that little paper symbol next to the <code>GET IT</code> button. If it's red, it means that the build failed.
|
|
<img alt="jitpack failed to build" src="../img/jitpack_fail.png" /></p>
|
|
|
|
</div>
|
|
</div><footer>
|
|
<div class="rst-footer-buttons" role="navigation" aria-label="Footer Navigation">
|
|
<a href="../03_Implement_a_service/" class="btn btn-neutral float-left" title="Implementing a Service"><span class="icon icon-circle-arrow-left"></span> Previous</a>
|
|
<a href="../05_Mock_tests/" class="btn btn-neutral float-right" title="Mock Tests">Next <span class="icon icon-circle-arrow-right"></span></a>
|
|
</div>
|
|
|
|
<hr/>
|
|
|
|
<div role="contentinfo">
|
|
<!-- Copyright etc -->
|
|
</div>
|
|
|
|
Built with <a href="https://www.mkdocs.org/">MkDocs</a> using a <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
|
</footer>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
<div class="rst-versions" role="note" aria-label="Versions">
|
|
<span class="rst-current-version" data-toggle="rst-current-version">
|
|
|
|
|
|
<span><a href="../03_Implement_a_service/" style="color: #fcfcfc">« Previous</a></span>
|
|
|
|
|
|
<span><a href="../05_Mock_tests/" style="color: #fcfcfc">Next »</a></span>
|
|
|
|
</span>
|
|
</div>
|
|
<script src="../js/jquery-3.6.0.min.js"></script>
|
|
<script>var base_url = "..";</script>
|
|
<script src="../js/theme_extra.js"></script>
|
|
<script src="../js/theme.js"></script>
|
|
<script src="../search/main.js"></script>
|
|
<script>
|
|
jQuery(function () {
|
|
SphinxRtdTheme.Navigation.enable(true);
|
|
});
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|