forked from AnySoftKeyboard/AnySoftKeyboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
103 lines (88 loc) · 4.27 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
import emoji.EmojiCollector
import emoji.EmojiKeyboardsExtractor
ext.androidBuildTools = '25.0.2'
ext.supportLibVersion = '24.1.1'
ext.AnySoftKeyboardApiVersion = '96aa819'
ext.sdkTargetVersion = 25
ext.sdkCompileVersion = 25
ext.sdkMinimumVersion = 7
buildscript {
repositories {
mavenLocal()
jcenter()
mavenCentral()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
maven { url 'https://jitpack.io' }
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath "net.ltgt.gradle:gradle-errorprone-plugin:0.0.8"
classpath 'com.github.triplet.gradle:play-publisher:1.1.5'
classpath 'com.github.AnySoftKeyboard.AnySoftKeyboardTools:makedictionary:99bd3e6'
classpath 'com.github.AnySoftKeyboard.AnySoftKeyboardTools:generatewordslist:99bd3e6'
classpath 'org.jsoup:jsoup:1.9.1'
classpath 'com.github.gfx.ribbonizer:plugin:0.6.0'
}
}
apply plugin: "net.ltgt.errorprone"
apply plugin: 'pmd'
configurations.errorprone {
resolutionStrategy.force 'com.google.errorprone:error_prone_core:2.0.13'
}
allprojects {
repositories {
jcenter()
mavenCentral()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
maven { url "https://jitpack.io" }
}
}
//this task is not used anymore, we use AOSP dictionary instead
task parseInputFilesForEnglishDictionary(type: com.anysoftkeyboard.tools.generatewordslist.GenerateWordsListTask) {
inputFiles file(new File(project.getProjectDir(), "english_dictionary/inputs/")).listFiles()
outputWordsListFile new File(project.getProjectDir(), "english_dictionary/words_from_inputs.xml")
}
task parseAospForEnglishDictionary(type: com.anysoftkeyboard.tools.generatewordslist.GenerateWordsListFromAOSPTask) {
inputFile new File(project.getProjectDir(), "english_dictionary/aosp_en_wordlist.combined")
outputWordsListFile new File(project.getProjectDir(), "english_dictionary/words_from_aosp.xml")
maxWordsInList 300000
}
task mergeAllWordLists(type: com.anysoftkeyboard.tools.generatewordslist.MergeWordsListTask) {
dependsOn parseAospForEnglishDictionary
inputWordsListFiles = [
new File(project.getProjectDir(), "english_dictionary/words_from_aosp.xml"),
new File(project.getProjectDir(), "english_dictionary/words_from_legacy.xml")
] as File[]
outputWordsListFile new File(project.getProjectDir(), "english_dictionary/words_merged.xml")
maxWordsInList 300000
wordsToDiscard = ['clubbing\'s', 'muggins\'s', 'olefin', 'cs\'s']
}
task makeEnglishDictionary(type: com.anysoftkeyboard.tools.makedictionary.MakeDictionaryTask) {
dependsOn mergeAllWordLists
inputWordsListFile new File(project.getProjectDir(), "english_dictionary/words_merged.xml")
resourcesFolder = new File(project.findProject("app").projectDir, "/src/main/res/")
}
task makeEmojiKeyboards {
doLast {
//http://unicode.org/emoji/charts/full-emoji-list.html
EmojiKeyboardsExtractor extractor = new EmojiKeyboardsExtractor(
new File(projectDir, "/emojis/full_emoji_data.htm"),
new File(project.findProject("app").projectDir, "/src/main/res/xml-v24/"))
//adding known collectors
extractor.addEmojiCollector(EmojiCollector.EMOTICONS_COLLECTOR)
extractor.addEmojiCollector(EmojiCollector.FLAGS_COLLECTOR)
extractor.addEmojiCollector(EmojiCollector.PEOPLE_COLLECTOR)
extractor.addEmojiCollector(EmojiCollector.ACTIVITY_COLLECTOR)
extractor.addEmojiCollector(EmojiCollector.ACCESSORIES_COLLECTOR)
extractor.addEmojiCollector(EmojiCollector.SCAPE_COLLECTOR)
extractor.addEmojiCollector(EmojiCollector.FOOD_COLLECTOR)
extractor.addEmojiCollector(EmojiCollector.NATURE_COLLECTOR)
extractor.addEmojiCollector(EmojiCollector.OFFICE_COLLECTOR)
extractor.addEmojiCollector(EmojiCollector.SIGNS_COLLECTOR)
extractor.addEmojiCollector(EmojiCollector.OCCASIONS_COLLECTOR)
extractor.addEmojiCollector(EmojiCollector.TRANSPORT_COLLECTOR)
extractor.setUncollectedEmojisCollector(EmojiCollector.UNCOLLECTED_COLLECTOR)
extractor.parseEmojiListIntoKeyboardResources()
}
}