-
-
Notifications
You must be signed in to change notification settings - Fork 735
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
Update README.md #1101
Update README.md #1101
Conversation
Updated gradle instructions according to new Android changes. Also added Kotlin version of code.
@L3K0V should this be merged after 2.0.0 release, or is this info already true for the current version; and is this PR still correct given the changes in #1095? |
I do not understand the purpose of the changes. Maybe @mobilekosmos can elaborate further? |
@L3K0V what exactly is not clear? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks nice just wonder about the dependencyResolutionManagement
. But we are good to go! 👍
If we are not sure then let's look further into it. We don't need to include an option that is unrelated to the example which we want to demonstrate. If we want to recommend an option that is not related to SDK but good practice, we can add a separate "Best Practice" section to the docs, as we have in Parse Server. |
Since Gradle 7 you get an error if specifying allProjects{} inside the app's module build.gradle. Also Android Studio project templates now generates that block in the settings.gradle file. More infos here |
Thanks for clarifying, so we can merge this after your PR where you upgrade gradle. Which PR is it? I'm still not sure about |
FAIL_ON_PROJECT_REPOS: If this mode is set, any repository declared directly in a project, either directly or via a plugin, will trigger a build error. We want to declare the repositories for all project centraly, so to avoid modules adds repositories which are anyways already declared centrally this flag fits the purpose I think. If for some reasson a module needs an extra repository some day you can change that flag anytime. https://docs.gradle.org/current/javadoc/org/gradle/api/initialization/resolve/RepositoriesMode.html |
The build output with that flag when adding a repository to a module.gradle would be following:
|
So if a developer wants to use the Parse Android SDK in their project, is it mandatory for them to add this?
|
No this is just for the scope of this project. If developer use the Parse Android SDK as Gradle dependency in their project there's no additional configurations to be made. |
Why do we add this line to the readme then, where we instruct a developer how to use the Parse Android SDK as dependency? Would it make more sense to change it to this? So we keep it as simple and compact as possible. DependencyAdd this in your root // gradle >=7
dependencyResolutionManagement {
repositories {
// ...
mavenCentral()
maven { url "https://jitpack.io" }
}
}
// gradle <7
allprojects {
repositories {
// ...
mavenCentral()
maven { url "https://jitpack.io" }
}
} |
I got you now. Partially, you don't put dependencyResolutionManagement in the gradle file, I will update the PR. |
I will close this PR and do the changes in the PR #1122 which upgrades gradle. |
Updated gradle instructions according to new Android changes. Also added Kotlin version of code.