This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Publish Android Kotlin Library Helper | |
* | |
* This Gradle script is based on https://gist.github.com/Robyer/a6578e60127418b380ca133a1291f017. | |
* The difference is that: | |
* 1. It uses Dokka for generating Kotlin Javadoc. | |
* 2. It uses Jfrog's plugin for publishing to Bintray. If you don't want to publish to Bintray, simply remove all the Bintray-related code. | |
* | |
* NOTE: You need to add Dokka and Bintray to your classpath for the two plugins to work. | |
* Update the buildscript in your project's build.gradle with the following: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Autocomplete | |
if [ -f /usr/local/git/contrib/completion/git-completion.bash ]; then | |
. /usr/local/git/contrib/completion/git-completion.bash | |
fi | |
# mostra se existem alterações no projeto (master/branch) | |
GIT_PS1_SHOWDIRTYSTATE=true | |
# necessário para o correto funcionamento da variável ‘__git_ps1’ | |
source /usr/local/git/contrib/completion/git-prompt.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'com.android.library' | |
android { | |
compileSdkVersion 28 | |
defaultConfig { | |
minSdkVersion 14 | |
targetSdkVersion 28 | |
versionCode 1 | |
versionName "1.0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// imports | |
public class ImageRotator { | |
public static Bitmap rotateImage(String path) throws IOException { | |
Bitmap bitmap = BitmapFactory.decodeFile(path); | |
return rotateImage(bitmap); | |
} | |
public static Bitmap rotateImage(Bitmap bitmap) throws IOException { | |
int rotate = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// You can use maven-publish-helper.gradle script without changes and even share it between multiple | |
// modules. Just place the maven-publish-helper.gradle file in the root directory of your project, | |
// then apply it at the bottom of your module's build.gradle file like this: | |
// ...content of module's build.gradle file... | |
apply from: '../maven-publish-helper.gradle' | |
publishing { | |
publications { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FragmentObserver extends Observable { | |
@Override | |
public void notifyObservers() { | |
setChanged(); // Set the changed flag to true, otherwise observers won't be notified. | |
super.notifyObservers(); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Alimentos e Bebidas | |
Arte e Antiguidades | |
Artigos Religiosos | |
Assinaturas e Revistas | |
Automóveis e Veículos | |
Bebês e Cia | |
Blu-Ray | |
Brindes / Materiais Promocionais | |
Brinquedos e Games | |
Casa e Decoração |