SHORT version:
    commit everything new
    clean up
    increment 	versionName
    and        	versionCode
        in the build.gradle file of the app module
    commit
    create tag that matches the new versionName prepended with a "v"
    create release
    build bundled and signed apk
    append signed apk

LONGER version: follows

git stuff
----------------
git commit
	commits changes into the project
git add [file]
git commit -m "blah blah"

git log --since="yesterday"

git log --name-status --follow --oneline [FILE]
	follow a file as its name changes

git log --grep="i18n" --author=yourname --since=2.weeks

git log --diff-filter=R --find-renames

git log --diff-filter=M --oneline

git show [hash] 
	shows changes of a commit

git branch --merged master
	which branches were merged into master?

git branch --no-merged master
	which ones were not merged?

distributed version control
git has different servers, as opposed to former tools like svn which had central repos
	distributed servers

overwrite the working area with the last good copy
git checkout -- hello.template
git checkout -- [yourfile]

git log --name-status --follow --oneline [filename]
	oneline makes log output more simple

checks out commits and their hashes

git checkout [hash]

git checkout [hash] -- hello.txt

git status
	gives "new file:	hello.txt"

git reset HEAD hello.txt
makes hello.txt untracked file

git status
	gives Untracked files: hello.txt

git log --diff-filter=D --oneline -- hello.template
	don't forget the "--"

git log --no-pager --diff-filter=D --oneline -- hello.template
	smaller output

git reset -- hello.template
	makes hello.template untracked

git reset --hard HEAD
	blows away anything in the staging area

[standard commit]
git status
	shows you where you are
	...maybe add some files to commit
git commit
	make your modifications worth uploading
git push
	maybe gives you error, if master is ahead :-(
	so...
git pull
	first and see what happens, then
git push 
	again

[create a tag]
git tag [tag_name]
git tag v2.0
	creates tag v2.0
git tag
	shows all your tags
git tag -a v2.0 -m "foo"
	creates tag v2.0 with message foo

git tag -n
	shows tags with messages

git push --tags
	pushes all tags,
	careful as this errors on existing tags


FDROID publishing guidelines
	...builds everything from source
to guarantee that sources are available for end users

JAR files are not accepted by the bot
    JARs are deleted before build, then the build should still succeed

fastlane structure
	short description is really short, 80  chars max

provide a signed and bundled release build apk with the github tag
	don't put it into the repo, as everyone would fork it

versioning
	versionName - a user facing string
	versionCode - integer that gets compared 

you have to match AndroidManifest.xml
	and	build.gradle

also tag name should match versionName
	in	build.gradle,
	but i guess tags are optional.
nevertheless, es ist gute praxis, releases zu "taggen"
f-droid erkennt automatisch neue versionen

fdroid only builds from releases
	version names
	version codes
		should match
keep using "v" prefix if used before.

https://android.izzysoft.de/articles/named/fdroid-intro-2

aufnahme einer app - 1. request for packaging auf gitlab
https://gitlab.com/fdroid/rfp/issues

als nächstes kommt der bot vorbei und prüft das angegebene quell repository
und erstellt einen post mit den ergebnissen der ersten prüfung
	aufnahmekriterien
	sicherheitsprobleme

aus den gemachten angaben wird eine metadaten datei erstellt
für korrekturanträge:
https://gitlab.com/fdroid/fdroiddata

https://f-droid.org/en/docs/FAQ_-_App_Developers/

https://gitlab.com/fdroid/fdroiddata

apparently , srclib is set in the metadata ...
    and fetched in the prebuild section.

https://www.boddie.org.uk/david/www-repo/Personal/Updates/2018/2018-11-11.html

F-Droid infrastructure builds all apps from source code and most of these are built using the standard android sdk

example srclib integration
metadata-file:
Build:[BuildNr]
	commit=[longHash]
	output=output.apk
	srclibs=duck@1.0.0
	build=PATH=$$duck$$ ./build.py output.apk

file srclibs/duck.txt
Repo Type:hg
Repo:https://bitbucket.org/dboddie/duck

In the metadata dir of the repo resides a txt file, which contains description of the app and its version, dependencies, build process and so on .

[paketname].txt

es kann mehrere builds geben:

Builds
 - 	versionName: 1.2
	versionCode: 12
	commit: v1.2

 - 	versionName: 1.3
	versionCode: 13
	commit: v1.3-xyz

versionName: xxx
versionCode: yyy
bestimmt die Erstellung der Version xxx, die den Versionscode yyy besitzt.

commit: xxx
bestimmt den Tag, commit oder revision-nummer, ab der die erstellung im quell-repo erfolgen soll

srclibs:
liste der quellbibliotheken oder android - projekte.

form "name@rev"
name ist der vorgegebene name der quellbibliothek
rev die revision bzw. das kennzeichen, das in der versionsverwaltung verwendet werden soll.

jede srclib besitzt eine metadaten datei 
es kann $$name$$ in den befehlen init prebuild build verwendet werden

beispiel tunerly:
srclibs:
  -	TarsosDSP@hash
prebuild: sed -i -e 'maven.localazy.com/d' ../build.gradle
scandelete:
  -	app/libs/
build:
  -	pushd $$TarsosDSP$$/build/
  -	ant tarsos_dsp_android_library
  -	popd
  -	mv $$TarsosDSP$$/build/TarsosDSP-Android-2.4.jar libs/TarsosDSP-2.4.jar

sed is a text editor without an interface

manipulate text in files and streams

S tream ED itor

pattern matching and text selection based on regular expressions
