Skip to content

Commit

Permalink
Fix maven central release (#35)
Browse files Browse the repository at this point in the history
* Fix documentation config

* Update dokka output

* Update website

* Add project name to pom

* Remove local changes from documentation

* Remove local changes from website

* Update dokka cleanup rule for new path

* remove dokka up-to-date checks

For some reason dokka is changing the styles.css file which means that CI can't verify if your remaining kdoc is up to date. Will investigate later.
  • Loading branch information
pedroql authored Apr 11, 2021
1 parent b44f571 commit 4022ebb
Show file tree
Hide file tree
Showing 41 changed files with 100 additions and 77 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ jobs:
run: |
./gradlew cleanDokka dokka
# the next command will list documentation files out of date. Please run ./gradlew dokka
git diff --exit-code --name-only || echo ::set-output name=status::failure
#git diff --exit-code --name-only || echo ::set-output name=status::failure
# the line above commented out due to a weird behaviour where styles.css is generated differently in my local
# machine and github
git diff --name-only
- name: Check which documentation files have changed
if: steps.doc-check.outputs.status == 'failure'
run: git diff > git-diff.txt
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ jobs:
run: |
./gradlew cleanDokka dokka
# the next command will list documentation files out of date. Please run ./gradlew dokka
git diff --exit-code --name-only || echo ::set-output name=status::failure
#git diff --exit-code --name-only || echo ::set-output name=status::failure
# the line above commented out due to a weird behaviour where styles.css is generated differently in my local
# machine and github
git diff --name-only
- name: Check which documentation files have changed
if: steps.doc-check.outputs.status == 'failure'
run: git diff > git-diff.txt
Expand Down
4 changes: 2 additions & 2 deletions docs/articles/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ different tradeoffs and it is your choice which one to use.</p>
<span style="color:#8f5902;font-style:italic">// call this when the view is inflated
</span><span style="color:#8f5902;font-style:italic"></span><span style="color:#204a87;font-weight:bold">fun</span> <span style="color:#000">setupUi</span><span style="color:#000;font-weight:bold">()</span> <span style="color:#000;font-weight:bold">{</span>
<span style="color:#000">with</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000">recyclerView</span><span style="color:#000;font-weight:bold">)</span> <span style="color:#000;font-weight:bold">{</span> <span style="color:#8f5902;font-style:italic">// ...
</span><span style="color:#8f5902;font-style:italic"></span> <span style="color:#000">adapter</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#204a87;font-weight:bold">this</span><span style="color:#000">@MyActivity</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">adapter</span>
</span><span style="color:#8f5902;font-style:italic"></span> <span style="color:#000">adapter</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#204a87;font-weight:bold">this</span><span style="color:#5c35cc;font-weight:bold">@MyActivity</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">adapter</span>
<span style="color:#000;font-weight:bold">}</span>
<span style="color:#000">swipeRefreshLayout</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">setOnRefreshListener</span> <span style="color:#000;font-weight:bold">{</span>
<span style="color:#000">actionChannel</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">offer</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000">Action</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">LoadUsers</span><span style="color:#000;font-weight:bold">)</span>
Expand Down Expand Up @@ -144,7 +144,7 @@ different tradeoffs and it is your choice which one to use.</p>

<span style="color:#204a87;font-weight:bold">val</span> <span style="color:#000">flow2</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000">Flow</span><span style="color:#000;font-weight:bold"><</span><span style="color:#000">Actions</span><span style="color:#000;font-weight:bold">></span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#000">findViewById</span><span style="color:#000;font-weight:bold"><</span><span style="color:#000">Button</span><span style="color:#000;font-weight:bold">>(</span><span style="color:#000">R</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">id</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">checkbox</span><span style="color:#000;font-weight:bold">)</span>
<span style="color:#000;font-weight:bold">.</span><span style="color:#000">checkedChanges</span><span style="color:#000;font-weight:bold">()</span>
<span style="color:#000;font-weight:bold">.</span><span style="color:#000">map</span> <span style="color:#000;font-weight:bold">{</span> <span style="color:#000">checked</span> <span style="color:#000;font-weight:bold">-></span> <span style="color:#000">Actions</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">DoMore</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000">checked</span><span style="color:#000;font-weight:bold">)</span> <span style="color:#000;font-weight:bold">}</span>
<span style="color:#000;font-weight:bold">.</span><span style="color:#000">map</span> <span style="color:#000;font-weight:bold">{</span> <span style="color:#000">checked</span> <span style="color:#ce5c00;font-weight:bold">-></span> <span style="color:#000">Actions</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">DoMore</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000">checked</span><span style="color:#000;font-weight:bold">)</span> <span style="color:#000;font-weight:bold">}</span>

<span style="color:#204a87;font-weight:bold">override</span> <span style="color:#204a87;font-weight:bold">fun</span> <span style="color:#000">actions</span><span style="color:#000;font-weight:bold">()</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#000">merge</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000">flow1</span><span style="color:#000;font-weight:bold">,</span><span style="color:#000">flow2</span><span style="color:#000;font-weight:bold">)</span>
</code></pre></div><p>Pros:</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<a href="../../index.html">mvflow</a>&nbsp;/&nbsp;<a href="../index.html">net.pedroloureiro.mvflow</a>&nbsp;/&nbsp;<a href="./index.html">EffectSender</a><br/>
<br/>
<h1>EffectSender</h1>
<code><span class="keyword">interface </span><span class="identifier">EffectSender</span><span class="symbol">&lt;</span><span class="identifier">T</span><span class="symbol">&gt;</span></code> <a href="https://github.com/pedroql/mvflow/blob/master/mvflow-core/src/main/kotlin/net/pedroloureiro/mvflow/MVFlow.kt#L55">(source)</a>
<code><span class="keyword">interface </span><span class="identifier">EffectSender</span><span class="symbol">&lt;</span><span class="identifier">T</span><span class="symbol">&gt;</span></code> <a href="https://github.com/pedroql/mvflow/blob/master/mvflow-core/src/main/kotlin/net/pedroloureiro/mvflow/MVFlow.kt#L54">(source)</a>
<p>Effect sender is an interface that allows you to send effects to be handled outside the handler when you use
<a href="../-handler-with-effects.html">HandlerWithEffects</a>.</p>
<h3>Functions</h3>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<br/>
<h1>offer</h1>
<a name="net.pedroloureiro.mvflow.EffectSender$offer(net.pedroloureiro.mvflow.EffectSender.T)"></a>
<code><span class="keyword">abstract</span> <span class="keyword">fun </span><span class="identifier">offer</span><span class="symbol">(</span><span class="identifier" id="net.pedroloureiro.mvflow.EffectSender$offer(net.pedroloureiro.mvflow.EffectSender.T)/effect">effect</span><span class="symbol">:</span>&nbsp;<span class="identifier">T</span><span class="symbol">)</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html"><span class="identifier">Boolean</span></a></code> <a href="https://github.com/pedroql/mvflow/blob/master/mvflow-core/src/main/kotlin/net/pedroloureiro/mvflow/MVFlow.kt#L80">(source)</a>
<code><span class="keyword">abstract</span> <span class="keyword">fun </span><span class="identifier">offer</span><span class="symbol">(</span><span class="identifier" id="net.pedroloureiro.mvflow.EffectSender$offer(net.pedroloureiro.mvflow.EffectSender.T)/effect">effect</span><span class="symbol">:</span>&nbsp;<span class="identifier">T</span><span class="symbol">)</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html"><span class="identifier">Boolean</span></a></code> <a href="https://github.com/pedroql/mvflow/blob/master/mvflow-core/src/main/kotlin/net/pedroloureiro/mvflow/MVFlow.kt#L79">(source)</a>
<p>Submits this effect to be handled somewhere externally, returning immediately whether it was successful.</p>
<p>Implementation detail: this event is sent to a buffered channel.</p>
<p>It returns true if the effect was successfully submitted.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<br/>
<h1>send</h1>
<a name="net.pedroloureiro.mvflow.EffectSender$send(net.pedroloureiro.mvflow.EffectSender.T)"></a>
<code><span class="keyword">abstract</span> <span class="keyword">suspend</span> <span class="keyword">fun </span><span class="identifier">send</span><span class="symbol">(</span><span class="identifier" id="net.pedroloureiro.mvflow.EffectSender$send(net.pedroloureiro.mvflow.EffectSender.T)/effect">effect</span><span class="symbol">:</span>&nbsp;<span class="identifier">T</span><span class="symbol">)</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span class="identifier">Unit</span></a></code> <a href="https://github.com/pedroql/mvflow/blob/master/mvflow-core/src/main/kotlin/net/pedroloureiro/mvflow/MVFlow.kt#L69">(source)</a>
<code><span class="keyword">abstract</span> <span class="keyword">suspend</span> <span class="keyword">fun </span><span class="identifier">send</span><span class="symbol">(</span><span class="identifier" id="net.pedroloureiro.mvflow.EffectSender$send(net.pedroloureiro.mvflow.EffectSender.T)/effect">effect</span><span class="symbol">:</span>&nbsp;<span class="identifier">T</span><span class="symbol">)</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span class="identifier">Unit</span></a></code> <a href="https://github.com/pedroql/mvflow/blob/master/mvflow-core/src/main/kotlin/net/pedroloureiro/mvflow/MVFlow.kt#L68">(source)</a>
<p>Send this effect to be handled somewhere externally. It suspends until the effect is received.</p>
<p>Implementation detail: this event is sent to a buffered channel. It suspends until the channel is able to receive
this value (in normal situations should be very brief) or throws an exception if the channel reached its buffer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<a href="../index.html">mvflow</a>&nbsp;/&nbsp;<a href="index.html">net.pedroloureiro.mvflow</a>&nbsp;/&nbsp;<a href="./-handler-with-effects.html">HandlerWithEffects</a><br/>
<br/>
<h1>HandlerWithEffects</h1>
<code><span class="keyword">typealias </span><span class="identifier">HandlerWithEffects</span><span class="symbol">&lt;</span><span class="identifier">State</span><span class="symbol">, </span><span class="identifier">Action</span><span class="symbol">, </span><span class="identifier">Mutation</span><span class="symbol">, </span><span class="identifier">Effect</span><span class="symbol">&gt;</span>&nbsp;<span class="symbol">=</span>&nbsp;<span class="symbol">(</span><span class="identifier">State</span><span class="symbol">,</span>&nbsp;<span class="identifier">Action</span><span class="symbol">,</span>&nbsp;<a href="-effect-sender/index.html"><span class="identifier">EffectSender</span></a><span class="symbol">&lt;</span><span class="identifier">Effect</span><span class="symbol">&gt;</span><span class="symbol">)</span>&nbsp;<span class="symbol">-&gt;</span>&nbsp;<a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html"><span class="identifier">Flow</span></a><span class="symbol">&lt;</span><span class="identifier">Mutation</span><span class="symbol">&gt;</span></code> <a href="https://github.com/pedroql/mvflow/blob/master/mvflow-core/src/main/kotlin/net/pedroloureiro/mvflow/MVFlow.kt#L47">(source)</a>
<code><span class="keyword">typealias </span><span class="identifier">HandlerWithEffects</span><span class="symbol">&lt;</span><span class="identifier">State</span><span class="symbol">, </span><span class="identifier">Action</span><span class="symbol">, </span><span class="identifier">Mutation</span><span class="symbol">, </span><span class="identifier">Effect</span><span class="symbol">&gt;</span>&nbsp;<span class="symbol">=</span>&nbsp;<span class="symbol">(</span><span class="identifier">State</span><span class="symbol">,</span>&nbsp;<span class="identifier">Action</span><span class="symbol">,</span>&nbsp;<a href="-effect-sender/index.html"><span class="identifier">EffectSender</span></a><span class="symbol">&lt;</span><span class="identifier">Effect</span><span class="symbol">&gt;</span><span class="symbol">)</span>&nbsp;<span class="symbol">-&gt;</span>&nbsp;<a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html"><span class="identifier">Flow</span></a><span class="symbol">&lt;</span><span class="identifier">Mutation</span><span class="symbol">&gt;</span></code> <a href="https://github.com/pedroql/mvflow/blob/master/mvflow-core/src/main/kotlin/net/pedroloureiro/mvflow/MVFlow.kt#L46">(source)</a>
<p>A function that on top of what <a href="-handler.html">Handler</a> does, it also might emit side effects that are subscribed by an external
component.</p>
<pre><code class="lang-kotlin">val example: Handler&lt;State, Action, Mutation, Effect&gt; = { _, _, effects: EffectProducer&lt;Effect&gt; -&gt;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<a href="../index.html">mvflow</a>&nbsp;/&nbsp;<a href="index.html">net.pedroloureiro.mvflow</a>&nbsp;/&nbsp;<a href="./-handler.html">Handler</a><br/>
<br/>
<h1>Handler</h1>
<code><span class="keyword">typealias </span><span class="identifier">Handler</span><span class="symbol">&lt;</span><span class="identifier">State</span><span class="symbol">, </span><span class="identifier">Action</span><span class="symbol">, </span><span class="identifier">Mutation</span><span class="symbol">&gt;</span>&nbsp;<span class="symbol">=</span>&nbsp;<span class="symbol">(</span><span class="identifier">State</span><span class="symbol">,</span>&nbsp;<span class="identifier">Action</span><span class="symbol">)</span>&nbsp;<span class="symbol">-&gt;</span>&nbsp;<a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html"><span class="identifier">Flow</span></a><span class="symbol">&lt;</span><span class="identifier">Mutation</span><span class="symbol">&gt;</span></code> <a href="https://github.com/pedroql/mvflow/blob/master/mvflow-core/src/main/kotlin/net/pedroloureiro/mvflow/MVFlow.kt#L36">(source)</a>
<code><span class="keyword">typealias </span><span class="identifier">Handler</span><span class="symbol">&lt;</span><span class="identifier">State</span><span class="symbol">, </span><span class="identifier">Action</span><span class="symbol">, </span><span class="identifier">Mutation</span><span class="symbol">&gt;</span>&nbsp;<span class="symbol">=</span>&nbsp;<span class="symbol">(</span><span class="identifier">State</span><span class="symbol">,</span>&nbsp;<span class="identifier">Action</span><span class="symbol">)</span>&nbsp;<span class="symbol">-&gt;</span>&nbsp;<a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html"><span class="identifier">Flow</span></a><span class="symbol">&lt;</span><span class="identifier">Mutation</span><span class="symbol">&gt;</span></code> <a href="https://github.com/pedroql/mvflow/blob/master/mvflow-core/src/main/kotlin/net/pedroloureiro/mvflow/MVFlow.kt#L35">(source)</a>
<p>Handler is a function that receives the current state and an action that just happened and acts on it.</p>
<p>It returns a <a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html">kotlinx.coroutines.flow.Flow</a> of Mutation which is the way it can mutate the current state if it needs
to.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<a href="../index.html">mvflow</a>&nbsp;/&nbsp;<a href="index.html">net.pedroloureiro.mvflow</a>&nbsp;/&nbsp;<a href="./-logger.html">Logger</a><br/>
<br/>
<h1>Logger</h1>
<code><span class="keyword">typealias </span><span class="identifier">Logger</span>&nbsp;<span class="symbol">=</span>&nbsp;<span class="symbol">(</span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html"><span class="identifier">String</span></a><span class="symbol">)</span>&nbsp;<span class="symbol">-&gt;</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span class="identifier">Unit</span></a></code> <a href="https://github.com/pedroql/mvflow/blob/master/mvflow-core/src/main/kotlin/net/pedroloureiro/mvflow/MVFlow.kt#L99">(source)</a>
<code><span class="keyword">typealias </span><span class="identifier">Logger</span>&nbsp;<span class="symbol">=</span>&nbsp;<span class="symbol">(</span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html"><span class="identifier">String</span></a><span class="symbol">)</span>&nbsp;<span class="symbol">-&gt;</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span class="identifier">Unit</span></a></code> <a href="https://github.com/pedroql/mvflow/blob/master/mvflow-core/src/main/kotlin/net/pedroloureiro/mvflow/MVFlow.kt#L98">(source)</a>
<p>Logger is a lambda you can provide to allow you to do some debugging using your favourite approach for it.</p>
<p>You will receive information about when flows are started, completed, and emissions that are taking place (actions,
mutations) as well as reducer invocations.</p>
Expand Down
Loading

0 comments on commit 4022ebb

Please sign in to comment.