Skip to content

Commit cd4247c

Browse files
committed
Add config gradle-maven-repositories to Android.
1 parent a206723 commit cd4247c

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

src/lime/tools/ProjectXMLParser.hx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1760,6 +1760,14 @@ class ProjectXMLParser extends HXProject
17601760
config.push("android.permission", value);
17611761
}
17621762

1763+
case "gradle-maven-repositories":
1764+
var repositories = config.getArrayString("android.gradle-maven-repositories");
1765+
1766+
if (repositories == null || repositories.indexOf(value) == -1)
1767+
{
1768+
config.push("android.gradle-maven-repositories", value);
1769+
}
1770+
17631771
case "gradle-version":
17641772
config.set("android.gradle-version", value);
17651773

templates/android/template/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ buildscript {
1616
allprojects {
1717
repositories {
1818
mavenCentral()
19-
google()
19+
google()::if ANDROID_GRADLE_MAVEN_REPOSITORIES::::foreach ANDROID_GRADLE_MAVEN_REPOSITORIES::
20+
maven { url = uri("::__current__::") }::end::::end::
2021
}::if ANDROID_GRADLE_BUILD_DIRECTORY::
2122
buildDir = "::ANDROID_GRADLE_BUILD_DIRECTORY::/::APP_FILE::/${project.name}"::end::
2223
}

tools/platforms/AndroidPlatform.hx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,8 @@ class AndroidPlatform extends PlatformTarget
545545
Sys.exit(1);
546546
}
547547

548+
context.ANDROID_GRADLE_MAVEN_REPOSITORIES = project.config.getArrayString("android.gradle-maven-repositories", []);
549+
548550
if (project.config.exists("android.gradle-build-directory"))
549551
{
550552
context.ANDROID_GRADLE_BUILD_DIRECTORY = project.config.getString("android.gradle-build-directory");

tools/tools.n

366 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)