mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-09-10 18:59:39 +02:00
Remove build dependency on Android SDK
This commit is contained in:
parent
cc87bf5111
commit
e0cb1cff3b
2 changed files with 2 additions and 26 deletions
22
build.gradle
22
build.gradle
|
@ -28,6 +28,7 @@ allprojects {
|
|||
apply plugin: 'jacoco'
|
||||
apply plugin: 'checkstyle'
|
||||
|
||||
// For non-sop modules, enable android api compatibility check
|
||||
if (!it.name.equals('pgpainless-sop')) {
|
||||
// animalsniffer
|
||||
apply plugin: 'ru.vyarus.animalsniffer'
|
||||
|
@ -56,7 +57,6 @@ allprojects {
|
|||
|
||||
project.ext {
|
||||
junitVersion = '5.7.1'
|
||||
androidBootClasspath = getAndroidRuntimeJar(pgpainlessMinAndroidSdk)
|
||||
rootConfigDir = new File(rootDir, 'config')
|
||||
gitCommit = getGitCommit()
|
||||
builtDate = (new SimpleDateFormat("yyyy-MM-dd")).format(new Date())
|
||||
|
@ -196,26 +196,6 @@ subprojects {
|
|||
processResources.dependsOn generateVersionProperties
|
||||
}
|
||||
|
||||
def getAndroidRuntimeJar(androidSdkApiLevel) {
|
||||
def androidHome = getAndroidHome()
|
||||
def androidJar = new File("$androidHome/platforms/android-$androidSdkApiLevel/android.jar")
|
||||
if (androidJar.isFile()) {
|
||||
return androidJar
|
||||
} else {
|
||||
throw new Exception("Can't find android.jar for API level $androidSdkApiLevel at $androidHome/platforms/android-$androidSdkApiLevel/android.jar. Please install corresponding SDK platform package")
|
||||
}
|
||||
}
|
||||
|
||||
def getAndroidHome() {
|
||||
def androidHomeEnv = System.getenv("ANDROID_HOME")
|
||||
if (androidHomeEnv == null) {
|
||||
throw new Exception("ANDROID_HOME environment variable is not set")
|
||||
}
|
||||
def androidHome = new File(androidHomeEnv)
|
||||
if (!androidHome.isDirectory()) throw new Exception("Environment variable ANDROID_HOME is not pointing to a directory")
|
||||
return androidHome
|
||||
}
|
||||
|
||||
def getGitCommit() {
|
||||
def projectDirFile = new File("$projectDir")
|
||||
def dotGit = new File("$projectDir/.git")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue