Skip to content
This repository has been archived by the owner on Oct 2, 2021. It is now read-only.

Commit

Permalink
Merge branch 'vanniktech-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
saeedmozaffariGithub committed May 13, 2018
2 parents 3d68057 + 886d5cc commit 510ba40
Show file tree
Hide file tree
Showing 8,826 changed files with 10,536 additions and 10,590 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
25 changes: 11 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,20 @@
language: android

android:
components:
- tools
- platform-tools

jdk:
- oraclejdk8

before_script:
- mkdir "$ANDROID_HOME/licenses" || true
- echo "8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license"

before_install:
- pip install --user codecov
# Install SDK license so Android Gradle plugin can install deps.
- mkdir "$ANDROID_HOME/licenses" || true
- echo "d56f5187479451eabf01fb78af6dfcb131a6481e" > "$ANDROID_HOME/licenses/android-sdk-license"

install: true

script: ./gradlew clean build

after_success:
- bash <(curl -s https://codecov.io/bash)
- .buildscript/deploy_snapshot.sh
- codecov

env:
global:
Expand All @@ -35,9 +28,13 @@ branches:
notifications:
email: false

sudo: true # Required since otherwise Travis gets killed.
sudo: false

before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle
- $HOME/.m2
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.android/build-cache
30 changes: 20 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# Emoji

[![Build Status](https://travis-ci.org/vanniktech/Emoji.svg?branch=master)](https://travis-ci.org/vanniktech/Emoji?branch=master)
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Emoji-green.svg?style=true)](https://android-arsenal.com/details/1/3287)
[![License](http://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)

A simple library to add Emoji support to your Android app. In a PopupWindow Emojis can be chosen. In order to edit and display text with Emojis this library provides public APIs: [`EmojiEditText`](emoji/src/main/java/com/vanniktech/emoji/EmojiEditText.java), [`EmojiTextView`](emoji/src/main/java/com/vanniktech/emoji/EmojiTextView.java) & [`EmojiButton`](emoji/src/main/java/com/vanniktech/emoji/EmojiButton.java).

The library has 4 different providers to choose from ([iOS](#ios-emojis), [EmojiOne](#emojione), [Google](#google) & [Twitter](#twitter)).
Expand All @@ -21,7 +17,8 @@ compile 'com.vanniktech:emoji-ios:0.5.1'
And install the provider (preferably in your Application class):

```java
EmojiManager.install(new IosEmojiProvider()); // This line needs to be executed before any usage of EmojiTextView, EmojiEditText or EmojiButton.
// This line needs to be executed before any usage of EmojiTextView, EmojiEditText or EmojiButton.
EmojiManager.install(new IosEmojiProvider());
```

## EmojiOne
Expand All @@ -37,7 +34,8 @@ compile 'com.vanniktech:emoji-one:0.5.1'
And install the provider (preferably in your Application class):

```java
EmojiManager.install(new EmojiOneProvider()); // This line needs to be executed before any usage of EmojiTextView, EmojiEditText or EmojiButton.
// This line needs to be executed before any usage of EmojiTextView, EmojiEditText or EmojiButton.
EmojiManager.install(new EmojiOneProvider());
```

## Google
Expand All @@ -53,7 +51,8 @@ compile 'com.vanniktech:emoji-google:0.5.1'
And install the provider (preferably in your Application class):

```java
EmojiManager.install(new GoogleEmojiProvider()); // This line needs to be executed before any usage of EmojiTextView, EmojiEditText or EmojiButton.
// This line needs to be executed before any usage of EmojiTextView, EmojiEditText or EmojiButton.
EmojiManager.install(new GoogleEmojiProvider());
```

## Twitter
Expand All @@ -69,7 +68,8 @@ compile 'com.vanniktech:emoji-twitter:0.5.1'
And install the provider (preferably in your Application class):

```java
EmojiManager.install(new TwitterEmojiProvider()); // This line needs to be executed before any usage of EmojiTextView, EmojiEditText or EmojiButton.
// This line needs to be executed before any usage of EmojiTextView, EmojiEditText or EmojiButton.
EmojiManager.install(new TwitterEmojiProvider());
```

### Custom Emojis
Expand All @@ -82,7 +82,17 @@ All of the core API lays in, which is being pulled in automatically by the provi
compile 'com.vanniktech:emoji:0.5.1'
```

### Inserting Emojis
### Custom EditText

If you want to add the emoji support to your existing `EditText`, you only have to
`implement` `EmojiEditTextInterface`. An example can be seen on the default `EditText`
implementation: `EmojiEditText`.

Keep in mind that this custom class must be a subclass of `android.view.View`.

---

## Inserting Emojis

Declare your [`EmojiEditText`](emoji/src/main/java/com/vanniktech/emoji/EmojiEditText.java) in your layout xml file.

Expand Down Expand Up @@ -181,4 +191,4 @@ No configuration needed.

Copyright (C) 2016 Vanniktech - Niklas Baudy

Licensed under the Apache License, Version 2.0
Licensed under the Apache License, Version 2.0
20 changes: 6 additions & 14 deletions UPDATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ This library features a NodeJS script for updating the Emoji images and the gene

## Contents of the script

The script does five things:
The script does three things:

- Downloading the required files
- Extract the images and meta info
- Optimize the images
- Copy the images to the respective locations
- Generate the Java code
- Parsing and organizing the meta data.
- Copy (and optimize) the images to the respective locations.
- Generate the Java code.

## Prerequisites

Expand Down Expand Up @@ -45,13 +43,7 @@ yarn start

## Parameters

Not all steps are always required. If the files were already downloaded for example, you would not need to re-download them. The following parameters are available:

```
--no-download
```

Skips the download.
Not all steps are always required. If you want to skip the time-consuming optimization for example, you could pass `--no-optimize`. The following parameters are available:

```
--no-optimize
Expand Down Expand Up @@ -82,5 +74,5 @@ npm start -- --no-download --no-copy
or

```
yarn start -- --no-download --no-copy
yarn start --no-download --no-copy
```
138 changes: 67 additions & 71 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,83 +1,79 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {
compileSdkVersion rootProject.ext.compileSdkVersion as int
buildToolsVersion rootProject.ext.buildToolsVersion as String

compileOptions {
sourceCompatibility rootProject.ext.javaVersion as JavaVersion
targetCompatibility rootProject.ext.javaVersion as JavaVersion
}

defaultConfig {
applicationId "com.vanniktech.emoji.sample"
minSdkVersion rootProject.ext.minSdkVersion as int
targetSdkVersion rootProject.ext.targetSdkVersion as int
versionCode rootProject.ext.versionCode as int
versionName rootProject.ext.versionName as String

vectorDrawables.useSupportLibrary = true

setProperty("archivesBaseName", "app-$versionName")

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

def shouldSign = project.hasProperty('RELEASE_STORE_FILE') && project.hasProperty('RELEASE_STORE_PASSWORD') && project.hasProperty('RELEASE_KEY_ALIAS') && project.hasProperty('RELEASE_KEY_PASSWORD')

if (shouldSign) {
signingConfigs {
release {
// http://stackoverflow.com/a/21020469/1979703
storeFile file(RELEASE_STORE_FILE)
storePassword RELEASE_STORE_PASSWORD
keyAlias RELEASE_KEY_ALIAS
keyPassword RELEASE_KEY_PASSWORD
}
}
compileSdkVersion rootProject.ext.compileSdkVersion as int

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

defaultConfig {
applicationId "com.vanniktech.emoji.sample"
minSdkVersion rootProject.ext.minSdkVersion as int
targetSdkVersion rootProject.ext.targetSdkVersion as int
versionCode rootProject.ext.versionCode as int
versionName rootProject.ext.versionName as String

vectorDrawables.useSupportLibrary = true

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

archivesBaseName = "app-$versionName"

def shouldSign = project.hasProperty('RELEASE_STORE_FILE') && project.hasProperty('RELEASE_STORE_PASSWORD') && project.hasProperty('RELEASE_KEY_ALIAS') && project.hasProperty('RELEASE_KEY_PASSWORD')

if (shouldSign) {
signingConfigs {
release {
// http://stackoverflow.com/a/21020469/1979703
storeFile file(RELEASE_STORE_FILE)
storePassword RELEASE_STORE_PASSWORD
keyAlias RELEASE_KEY_ALIAS
keyPassword RELEASE_KEY_PASSWORD
}
}

buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
shrinkResources true
zipAlignEnabled true

if (shouldSign) {
signingConfig signingConfigs.release
}
}

debug {
versionNameSuffix '-RC'
}
}

buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
shrinkResources true
zipAlignEnabled true

if (shouldSign) {
signingConfig signingConfigs.release
}
}
}
}

dependencies {
compile project(':emoji-ios')
compile project(':emoji-google')
compile project(':emoji-google-compat')
compile project(':emoji-twitter')
compile project(':emoji-one')
compile project(':emoji-kotlin')

compile rootProject.ext.supportAppCompat
compile rootProject.ext.supportRecyclerView
compile rootProject.ext.supportEmojiBundled

debugCompile rootProject.ext.leakCanaryDebug
releaseCompile rootProject.ext.leakCanaryRelease

androidTestCompile deps.support.test.espresso.core
androidTestCompile deps.support.test.runner
androidTestCompile deps.support.test.rules
androidTestCompile deps.fastLaneScreenGrab
implementation project(':emoji-ios')
implementation project(':emoji-google')
implementation project(':emoji-google-compat')
implementation project(':emoji-twitter')
implementation project(':emoji-one')
implementation project(':emoji-kotlin')

implementation rootProject.ext.supportAppCompat
implementation rootProject.ext.supportRecyclerView
implementation rootProject.ext.supportEmojiBundled

debugImplementation rootProject.ext.leakCanaryDebug
releaseImplementation rootProject.ext.leakCanaryRelease

androidTestImplementation deps.support.test.espresso.core
androidTestImplementation deps.support.test.runner
androidTestImplementation deps.support.test.rules
androidTestImplementation deps.fastLaneScreenGrab
}

configurations.all {
resolutionStrategy {
force rootProject.ext.supportAnnotations
}
resolutionStrategy {
force rootProject.ext.supportAnnotations
}
}
2 changes: 2 additions & 0 deletions app/proguard-rules.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-dontwarn kotlin.**
-dontwarn org.jetbrains.annotations.**
Loading

0 comments on commit 510ba40

Please sign in to comment.