Skip to content

Commit 379a016

Browse files
committed
LatinIME: Support building and running make-keyboard-text with gradle
Change-Id: I1ec3a7637fcd939f9475379f4836bf531590ac0c
1 parent e6a550f commit 379a016

2 files changed

Lines changed: 41 additions & 0 deletions

File tree

settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
rootProject.name = "LatinIME"
2+
include ':tools:make-keyboard-text'
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
plugins {
2+
id 'application'
3+
}
4+
5+
application {
6+
mainClass = 'com.android.inputmethod.keyboard.tools.MakeKeyboardText'
7+
}
8+
9+
sourceSets {
10+
main.java.srcDir 'src'
11+
main.resources.srcDir 'res'
12+
}
13+
14+
jar {
15+
manifest {
16+
attributes 'Main-Class': application.mainClass
17+
}
18+
}
19+
20+
java {
21+
sourceCompatibility = JavaVersion.VERSION_1_8
22+
targetCompatibility = JavaVersion.VERSION_1_8
23+
}
24+
25+
tasks.register('generate', JavaExec) {
26+
mainClass = application.mainClass
27+
dependsOn jar
28+
classpath jar.archiveFile
29+
workingDir rootProject.projectDir
30+
args '-java', 'java'
31+
32+
doLast {
33+
println()
34+
println("===========================================================================")
35+
println('WARNING: The locales will be messed up when running this on a host JVM. You')
36+
println('should manually merge the required changes.')
37+
println('===========================================================================')
38+
println()
39+
}
40+
}

0 commit comments

Comments
 (0)