Skip to content

Commit 8e7f44b

Browse files
committed
Changed the hard coded relative path to use the Unity substitution for DIR_UNITYPROJECT so that the project can be exported from unity to any location.
1 parent f4cfe4d commit 8e7f44b

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

source/PlayServicesResolver/src/PlayServicesResolver.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1891,9 +1891,8 @@ internal static IList<string> GradleMavenReposLines(ICollection<Dependency> depe
18911891
// generate the root Gradle project in "Temp/gradleOut" when *not* exporting a
18921892
// gradle project.
18931893
lines.Add(String.Format(
1894-
" def unityProjectPath = \"{0}\" + " +
1895-
"file(rootProject.projectDir.path + \"/../../\").absolutePath",
1896-
GradleWrapper.FILE_SCHEME));
1894+
" def unityProjectPath = \"{0}**DIR_UNITYPROJECT**\"",
1895+
GradleWrapper.FILE_SCHEME));
18971896
lines.Add(" maven {");
18981897
lines.Add(" url \"https://maven.google.com\"");
18991898
lines.Add(" }");

source/PlayServicesResolver/test/resolve_async/ExpectedArtifacts/NoExport/GradleTemplate/mainTemplate.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ allprojects {
2222
// Android Resolver Repos Start
2323
([rootProject] + (rootProject.subprojects as List)).each { project ->
2424
project.repositories {
25-
def unityProjectPath = "file:///" + file(rootProject.projectDir.path + "/../../").absolutePath
25+
def unityProjectPath = "file:///**DIR_UNITYPROJECT**"
2626
maven {
2727
url "https://maven.google.com"
2828
}

source/PlayServicesResolver/test/resolve_async/ExpectedArtifacts/NoExport/GradleTemplateJetifier/mainTemplate.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ allprojects {
2828
}
2929
([rootProject] + (rootProject.subprojects as List)).each { project ->
3030
project.repositories {
31-
def unityProjectPath = "file:///" + file(rootProject.projectDir.path + "/../../").absolutePath
31+
def unityProjectPath = "file:///**DIR_UNITYPROJECT**"
3232
maven {
3333
url "https://maven.google.com"
3434
}

source/PlayServicesResolver/test/resolve_async/ExpectedArtifacts/NoExport/GradleTemplateLibrary/mainTemplate.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ allprojects {
2222
// Android Resolver Repos Start
2323
([rootProject] + (rootProject.subprojects as List)).each { project ->
2424
project.repositories {
25-
def unityProjectPath = "file:///" + file(rootProject.projectDir.path + "/../../").absolutePath
25+
def unityProjectPath = "file:///**DIR_UNITYPROJECT**"
2626
maven {
2727
url "https://maven.google.com"
2828
}

0 commit comments

Comments
 (0)