Skip to content

Instantly share code, notes, and snippets.

@iniyanmurugavel
Created May 16, 2020 12:07
Show Gist options
  • Select an option

  • Save iniyanmurugavel/af368ac93de425f419fdb57f4e1b088c to your computer and use it in GitHub Desktop.

Select an option

Save iniyanmurugavel/af368ac93de425f419fdb57f4e1b088c to your computer and use it in GitHub Desktop.
Upload Fileutils
// Need to know about exclude
exclude group:"com.squareup.retrofit2" , module :"retrofit"
exclude group:"com.squareup.retrofit2" , module :"converter-gson"
// Library Creation
https://jitpack.io/com/github/iniyan455/MyTestLibrary/0.1.0/build.log
//Deeplinking
https://github.com/hamidsn/deferred-deeplink/tree/master/app/src/main/java/sample/deeplinking/deferred/receiver
//rules for playstore
https://play.google.com/about/developer-distribution-agreement.html https://www.base64decode.org/
deferrred url
https://www.linkedin.com/pulse/android-deferred-deep-link-hamid-sedghi-n/
Command for Gradle in Terminal
chmod +x gradlew
./gradlew app:dependencies // list of dependecies shown
./gradlew app:dependencies > dependencies.txt //create function
// Import selected JARs from mylibrary folder
compile fileTree(include: ['first.jar','second.jar'], dir: '../mylibrary')"
// To find a dependecy code
project.afterEvaluate {
tasks.create(""depsize"") {
listConfigurationDependencies(configurations.default)
}
tasks.create(""depsize-all-configurations"") {
configurations.each {
if (it.isCanBeResolved()) {
listConfigurationDependencies(it)
}
}
}
}
def listConfigurationDependencies(Configuration configuration) {
def formatStr = ""%,10.2f""
def size = configuration.collect { it.length() / (1024 * 1024) }.sum()
def out = new StringBuffer()
out << ""\nConfiguration name: \""${configuration.name}\""\n""
if (size) {
out << 'Total dependencies size:'.padRight(65)
out << ""${String.format(formatStr, size)} Mb\n\n""
configuration.sort { -it.length() }
.each {
out << ""${it.name}"".padRight(65)
out << ""${String.format(formatStr, (it.length() / 1024))} kb\n""
}
} else {
out << 'No dependencies found';
}
println(out)
}"
Step to add module in android project
Open your project in Android Studio
Download the library (using Git, or a zip archive to unzip)
Create a folder ""subProject"" in your project
Copy and paste the FreemiumLibrary folder to your subProject folder
On the root of your project directory create/modify the settings.gradle file.
It should contain something like the following:
include 'MyApp', ':subProject:FreemiumLibrary'
gradle clean & build/close the project and reopen/re-import it.
Edit your project's build.gradle to add this in the ""depencies"" section:
dependencies {
//...
compile project(':subProject:FreemiumLibrary')
}
// Gradle flatDir in Android studio
Let’s say we have kept AAR file (mylib.aar) in libs folder,ra
so in Top level build.gradle we need to specify flatDir as following:
// Import selected JARs from mylibrary folder
compile fileTree(include: ['first.jar','second.jar'], dir: '../mylibrary')"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment