mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-09-10 18:59:41 +02:00
Add ServerPingWithAlarmManager to smack-android
This commit is contained in:
parent
d8c77de785
commit
bfebf6a4a5
5 changed files with 203 additions and 22 deletions
21
build.gradle
21
build.gradle
|
@ -34,6 +34,10 @@ allprojects {
|
|||
builtDate = (new java.text.SimpleDateFormat("yyyy-MM-dd")).format(new Date())
|
||||
oneLineDesc = 'An Open Source XMPP (Jabber) client library'
|
||||
jxmppVersion = "0.3.0"
|
||||
smackMinAndroidSdk = 8
|
||||
androidProjects = [':smack-tcp',':smack-core', ':smack-resolver-minidns', ':smack-sasl-provided', ':smack-extensions', ':smack-experimental'].collect{ project(it) }
|
||||
androidBootClasspath = getAndroidRuntimeJar()
|
||||
androidJavadocOffline = getAndroidJavadocOffline()
|
||||
}
|
||||
group = 'org.igniterealtime.smack'
|
||||
sourceCompatibility = 1.7
|
||||
|
@ -306,3 +310,20 @@ def getGitCommit() {
|
|||
assert !gitCommit.isEmpty()
|
||||
gitCommit
|
||||
}
|
||||
|
||||
def getAndroidRuntimeJar() {
|
||||
def androidHome = new File("$System.env.ANDROID_HOME")
|
||||
if (!androidHome.isDirectory()) throw new Exception("ANDROID_HOME not found or set")
|
||||
def androidJar = new File("$androidHome/platforms/android-$smackMinAndroidSdk/android.jar")
|
||||
if (androidJar.isFile()) {
|
||||
return androidJar
|
||||
} else {
|
||||
throw new Exception("Can't find android.jar for $smackMinAndroidSdk API. Please install corresponding SDK platform package")
|
||||
}
|
||||
}
|
||||
|
||||
def getAndroidJavadocOffline() {
|
||||
def androidHome = new File("$System.env.ANDROID_HOME")
|
||||
if (!androidHome.isDirectory()) throw new Exception("ANDROID_HOME not found or set")
|
||||
return "$System.env.ANDROID_HOME" + "/docs/reference"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue