Add TinyPinyin to your project
masterTo use TinyPinyin in a Java or Android project, add the core dependency and any optional lexicon dependencies to your build.gradle file.
Note: Ensure you have mavenCentral() and the Aliyun Maven repository configured in your repositories block.
buildscript {
repositories {
maven {
url 'https://maven.aliyun.com/repository/public'
}
mavenCentral()
}
dependencies {
compile 'com.github.promeg:tinypinyin:2.0.3' // TinyPinyin core (~80KB)
compile 'com.github.promeg:tinypinyin-lexicons-android-cncity:2.0.3' // Optional: Android Chinese city lexicon
compile 'com.github.promeg:tinypinyin-lexicons-java-cncity:2.0.3' // Optional: Java Chinese city lexicon
}
}