-
Notifications
You must be signed in to change notification settings - Fork 370
activating highest version in duplicate dependencies. #456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
vimanyu
merged 10 commits into
master
from
bugfix/duplicate-dependencies-gradle-template
Aug 6, 2021
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
1453304
activating highest version in duplicate dependencies.
vimanyu de96b33
new method to get package specs and vesion metadata
vimanyu 6c921ec
using new method to avoid any possibility of duplicates
vimanyu 7dd20e6
updated test case with a duplicate package from another source file.
vimanyu e3587be
logging the duplicate package case
vimanyu a1992c4
added duplicate package with wildcard version.
vimanyu f4b84d1
removed untested APIs and refactored.
vimanyu 5cd1b05
Merge branch 'bugfix/duplicate-dependencies-gradle-template' of https…
vimanyu d419ab7
moved variable to loop
vimanyu bc2ebf9
removed unncessary module import
vimanyu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...ject/Assets/ExternalDependencyManager/Editor/TestAdditionalDuplicateDependencies.template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<dependencies> | ||
<androidPackages> | ||
<!-- Duplicate entry for package with a different version (higher). --> | ||
<androidPackage spec="com.google.android.gms:play-services-base:18.0.1" /> | ||
<!-- Duplicate entry for package with a different version (lower). --> | ||
<androidPackage spec="com.google.android.gms:play-services-base:12.0.1" /> | ||
vimanyu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<!-- Duplicate entry for package with a different version (wildcard). --> | ||
<androidPackage spec="com.google.firebase:firebase-app-unity:5.+"/> | ||
<!-- Duplicate entry for package with the exact same version. --> | ||
<androidPackage spec="com.android.support:support-annotations:26.1.0"/> | ||
</androidPackages> | ||
</dependencies> | ||
|
104 changes: 104 additions & 0 deletions
104
...ityProject/ExpectedArtifacts/NoExport/GradleTemplateDuplicatePackages/mainTemplate.gradle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
// GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN | ||
|
||
buildscript { | ||
repositories { | ||
jcenter() | ||
google() | ||
} | ||
|
||
dependencies { | ||
classpath 'com.android.tools.build:gradle:3.0.1' | ||
} | ||
} | ||
|
||
allprojects { | ||
repositories { | ||
flatDir { | ||
dirs 'libs' | ||
} | ||
} | ||
} | ||
|
||
// Android Resolver Repos Start | ||
([rootProject] + (rootProject.subprojects as List)).each { project -> | ||
project.repositories { | ||
def unityProjectPath = $/file:///**DIR_UNITYPROJECT**/$.replace("\\", "/") | ||
maven { | ||
url "https://maven.google.com" | ||
} | ||
maven { | ||
url "file:///my/nonexistant/test/repo" // Assets/ExternalDependencyManager/Editor/TestDependencies.xml:17 | ||
} | ||
maven { | ||
url (unityProjectPath + "/project_relative_path/repo") // Assets/ExternalDependencyManager/Editor/TestDependencies.xml:17 | ||
} | ||
maven { | ||
url (unityProjectPath + "/Assets/GeneratedLocalRepo/Firebase/m2repository") // Assets/ExternalDependencyManager/Editor/TestDependencies.xml:10 | ||
} | ||
mavenLocal() | ||
jcenter() | ||
mavenCentral() | ||
} | ||
} | ||
// Android Resolver Repos End | ||
apply plugin: 'com.android.application' | ||
|
||
dependencies { | ||
implementation fileTree(dir: 'libs', include: ['*.jar']) | ||
// Android Resolver Dependencies Start | ||
compile 'com.android.support:support-annotations:26.1.0' // Assets/ExternalDependencyManager/Editor/TestDependencies.xml:4 | ||
// compile 'com.google.android.gms:play-services-base:12.0.1' // Assets/ExternalDependencyManager/Editor/TestAdditionalDuplicateDependencies.xml:6 | ||
// compile 'com.google.android.gms:play-services-base:15.0.1' // Assets/ExternalDependencyManager/Editor/TestAdditionalDependencies.xml:3 | ||
compile 'com.google.android.gms:play-services-base:18.0.1' // Assets/ExternalDependencyManager/Editor/TestAdditionalDuplicateDependencies.xml:4 | ||
// compile 'com.google.firebase:firebase-app-unity:5.+' // Assets/ExternalDependencyManager/Editor/TestAdditionalDuplicateDependencies.xml:8 | ||
compile 'com.google.firebase:firebase-app-unity:5.1.1' // Assets/ExternalDependencyManager/Editor/TestDependencies.xml:10 | ||
compile 'com.google.firebase:firebase-common:16.0.0' // Google.AndroidResolverIntegrationTests.SetupDependencies | ||
compile 'org.test.psr:classifier:1.0.1:foo@aar' // Assets/ExternalDependencyManager/Editor/TestDependencies.xml:12 | ||
// Android Resolver Dependencies End | ||
**DEPS**} | ||
|
||
// Android Resolver Exclusions Start | ||
android { | ||
packagingOptions { | ||
exclude ('lib/unsupported/libFirebaseCppApp-5.1.1.so') | ||
} | ||
} | ||
// Android Resolver Exclusions End | ||
android { | ||
compileSdkVersion **APIVERSION** | ||
buildToolsVersion '**BUILDTOOLS**' | ||
|
||
defaultConfig { | ||
minSdkVersion **MINSDKVERSION** | ||
targetSdkVersion **TARGETSDKVERSION** | ||
applicationId '**APPLICATIONID**' | ||
ndk { | ||
abiFilters **ABIFILTERS** | ||
} | ||
versionCode **VERSIONCODE** | ||
versionName '**VERSIONNAME**' | ||
} | ||
|
||
lintOptions { | ||
abortOnError false | ||
} | ||
|
||
aaptOptions { | ||
noCompress '.unity3d', '.ress', '.resource', '.obb'**STREAMING_ASSETS** | ||
}**SIGN** | ||
|
||
buildTypes { | ||
debug { | ||
minifyEnabled **MINIFY_DEBUG** | ||
useProguard **PROGUARD_DEBUG** | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt'**USER_PROGUARD** | ||
jniDebuggable true | ||
} | ||
release { | ||
minifyEnabled **MINIFY_RELEASE** | ||
useProguard **PROGUARD_RELEASE** | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt'**USER_PROGUARD****SIGNCONFIG** | ||
} | ||
}**PACKAGING_OPTIONS****SPLITS** | ||
**BUILT_APK_LOCATION** | ||
}**SPLITS_VERSION_CODE****SOURCE_BUILD_SETUP** |
65 changes: 65 additions & 0 deletions
65
...ct/ExpectedArtifacts/NoExport/GradleTemplateDuplicatePackages/mainTemplateDISABLED.gradle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
// GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN | ||
|
||
buildscript { | ||
repositories { | ||
jcenter() | ||
google() | ||
} | ||
|
||
dependencies { | ||
classpath 'com.android.tools.build:gradle:3.0.1' | ||
} | ||
} | ||
|
||
allprojects { | ||
repositories { | ||
flatDir { | ||
dirs 'libs' | ||
} | ||
} | ||
} | ||
|
||
apply plugin: 'com.android.application' | ||
|
||
dependencies { | ||
implementation fileTree(dir: 'libs', include: ['*.jar']) | ||
**DEPS**} | ||
|
||
android { | ||
compileSdkVersion **APIVERSION** | ||
buildToolsVersion '**BUILDTOOLS**' | ||
|
||
defaultConfig { | ||
minSdkVersion **MINSDKVERSION** | ||
targetSdkVersion **TARGETSDKVERSION** | ||
applicationId '**APPLICATIONID**' | ||
ndk { | ||
abiFilters **ABIFILTERS** | ||
} | ||
versionCode **VERSIONCODE** | ||
versionName '**VERSIONNAME**' | ||
} | ||
|
||
lintOptions { | ||
abortOnError false | ||
} | ||
|
||
aaptOptions { | ||
noCompress '.unity3d', '.ress', '.resource', '.obb'**STREAMING_ASSETS** | ||
}**SIGN** | ||
|
||
buildTypes { | ||
debug { | ||
minifyEnabled **MINIFY_DEBUG** | ||
useProguard **PROGUARD_DEBUG** | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt'**USER_PROGUARD** | ||
jniDebuggable true | ||
} | ||
release { | ||
minifyEnabled **MINIFY_RELEASE** | ||
useProguard **PROGUARD_RELEASE** | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt'**USER_PROGUARD****SIGNCONFIG** | ||
} | ||
}**PACKAGING_OPTIONS****SPLITS** | ||
**BUILT_APK_LOCATION** | ||
}**SPLITS_VERSION_CODE****SOURCE_BUILD_SETUP** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.