-
-
Notifications
You must be signed in to change notification settings - Fork 290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kotlin module #147
Merged
Merged
Kotlin module #147
Changes from 23 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
4757cbd
Micro optimization to for loops.
e14f87d
Added EmojiUtils + Tests.
d835b7a
WIP
fba26ec
Fixed nits
a77379d
Removed isEmpty method.
2610f3d
Forgot some test names.
095a84b
Merge branch 'ab/emojiutils' into ab/kotlin-module
ee1fbf8
Added EmojiExtensions
8282318
Merge remote-tracking branch 'origin/master' into ab/kotlin-module
5df1bfe
Small nits.
8fa70bc
Moved classpath to actual module.
57c6c4b
Remove maven central()
vanniktech e5ee805
Merge branch 'master' into ab/kotlin-module
vanniktech 1396587
Merge branch 'master' into ab/kotlin-module
vanniktech 31e6f41
Fix dependency classpath.
4dc3887
Trying previous Kotlin version.
98d34d4
Merge branch 'master' into ab/kotlin-module
vanniktech 25b0a28
Merge branch 'master' into ab/kotlin-module
vanniktech bdc15c7
Merge branch 'master' into ab/kotlin-module
vanniktech 517d455
Merge branch 'master' into ab/kotlin-module
vanniktech ce6c06c
Merge branch 'master' into ab/kotlin-module
c9a6ba1
Bump lib version
53ca3f8
049eec5
Moved kotlin to java package
1eca344
Fix removed import
aballano File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
apply plugin: 'com.android.library' | ||
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 { | ||
minSdkVersion rootProject.ext.minSdkVersion as int | ||
} | ||
|
||
resourcePrefix 'emoji' | ||
|
||
sourceSets { | ||
main.java.srcDirs += 'src/main/kotlin' | ||
} | ||
} | ||
|
||
dependencies { | ||
compile project(':emoji') | ||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" | ||
} | ||
|
||
apply from: rootProject.file('gradle/gradle-mvn-push.gradle') |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
POM_NAME=Emoji | ||
POM_ARTIFACT_ID=emoji-kotlin | ||
POM_PACKAGING=aar |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<manifest package="com.vanniktech.emoji.kotlin" /> |
7 changes: 7 additions & 0 deletions
7
emoji-kotlin/src/main/kotlin/com/vanniktech/emoji/kotlin/EmojiExtensions.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.vanniktech.emoji.kotlin | ||
|
||
import com.vanniktech.emoji.EmojiUtils | ||
|
||
fun String.isOnlyEmojis() = EmojiUtils.isOnlyEmojis(this) | ||
|
||
fun String.emojisCount() = EmojiUtils.emojisCount(this) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,6 +85,7 @@ afterEvaluate { project -> | |
task androidJavadocs(type: Javadoc) { | ||
source = android.sourceSets.main.java.srcDirs | ||
classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) | ||
excludes = ['**/*.kt'] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so this fixed the issue? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, basically ignoring Kotlin files for javadoc generation. |
||
|
||
if (JavaVersion.current().isJava8Compatible()) { | ||
options.addStringOption('Xdoclint:none', '-quiet') | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
include ':app', ':emoji', ':emoji-ios', ':emoji-google', ':emoji-twitter', ':emoji-one', ':emoji-google-compat' | ||
include ':app', ':emoji', ':emoji-ios', ':emoji-google', ':emoji-twitter', ':emoji-one', ':emoji-google-compat', ':emoji-kotlin' |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you just do everything in
src/main/java
?