diff --git a/android/build.gradle b/android/build.gradle index d0e8c792..32b3416c 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,5 +1,6 @@ buildscript { repositories { + google() jcenter() mavenCentral() maven { diff --git a/build.gradle b/build.gradle index 0a631de9..43f77262 100644 --- a/build.gradle +++ b/build.gradle @@ -4,8 +4,10 @@ ext { allprojects { repositories { + google() mavenLocal() mavenCentral() + jcenter() } } diff --git a/modules.gradle b/modules.gradle index e81da2bd..4b0be1d0 100644 --- a/modules.gradle +++ b/modules.gradle @@ -32,7 +32,12 @@ configure(subprojects.findAll { it.name.startsWith('modules/') }) { } dependencies { - compile project(path: ':liferay-android-sdk', configuration: 'default') + if (isJavaCompile()) { + compile 'com.liferay.mobile:liferay-android-sdk:7.0.9' + } else { + compile project(path: ':liferay-android-sdk', configuration: 'default') + } + compile group: 'com.google.android', name: 'android', version: '2.3.3' compile group: 'org.apache.httpcomponents', name: 'httpclient-android', version: '4.3.3' compile group: 'org.apache.httpcomponents', name: 'httpmime', version: '4.3.3' @@ -129,6 +134,10 @@ createModule { description = "Creates SDK Builder modules." } +def isJavaCompile() { + return gradle.startParameter.taskNames.size() > 0 && gradle.startParameter.taskNames.get(0).equals("jar") +} + def addTextColor(text, startColor, endColor=COLORS.WHITE) { return "${Character.toChars(27)}[${startColor}m${text}${Character.toChars(27)}[${endColor}m" }