Created
July 24, 2022 16:42
-
-
Save geek-atif/384b8b943278e5d7eca233a5bcda598f to your computer and use it in GitHub Desktop.
This file contains 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
apply plugin: 'com.android.library' //Add this for fat AAR | |
//apply plugin: 'com.android.application' //comment this | |
apply plugin: 'kotlin-android' | |
apply plugin: 'kotlin-android-extensions' | |
apply plugin: 'kotlin-kapt' | |
apply plugin: 'project-report' | |
apply plugin: "org.jlleitschuh.gradle.ktlint" | |
apply plugin: 'com.kezong.fat-aar' //Add this for fat AAR | |
android { | |
compileSdkVersion 30 | |
compileOptions { | |
sourceCompatibility JavaVersion.VERSION_1_8 | |
targetCompatibility JavaVersion.VERSION_1_8 | |
} | |
aaptOptions.cruncherEnabled = false | |
aaptOptions.useNewCruncher = false | |
defaultConfig { | |
//applicationId "com.atifqamar.sample" //comment this | |
minSdkVersion 22 | |
targetSdkVersion 30 | |
versionCode 1 | |
versionName "1.0" | |
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | |
} | |
buildTypes { | |
release { | |
minifyEnabled false | |
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | |
} | |
debug{ | |
initWith(buildTypes.debug) | |
} | |
} | |
dexOptions { | |
preDexLibraries = false | |
javaMaxHeapSize="4g" | |
additionalParameters=['--core-library'] | |
} | |
kotlinOptions { | |
jvmTarget = "1.8" | |
} | |
packagingOptions { | |
exclude 'META-INF/DEPENDENCIES' | |
exclude 'META-INF/NOTICE' | |
exclude 'META-INF/LICENSE' | |
exclude 'META-INF/LICENSE.txt' | |
exclude 'META-INF/NOTICE.txt' | |
exclude 'org/bouncycastle/x509/CertPathReviewerMessages.properties' | |
exclude 'org/bouncycastle/x509/CertPathReviewerMessages_de.properties' | |
//exclude 'libs/rt.jar' | |
} | |
lintOptions { | |
abortOnError false | |
} | |
packagingOptions { | |
exclude 'META-INF/library_release.kotlin_module' | |
} | |
testOptions { | |
unitTests.returnDefaultValues = true | |
unitTests { | |
includeAndroidResources = true | |
} | |
} | |
compileOptions { | |
sourceCompatibility JavaVersion.VERSION_1_8 | |
targetCompatibility JavaVersion.VERSION_1_8 | |
} | |
} | |
configurations { | |
compileOnly | |
} | |
sourceSets.all { | |
compileClasspath += configurations.compileOnly | |
} | |
dependencies { | |
implementation fileTree(dir: "libs", include: ["*.jar"]) | |
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" | |
implementation 'androidx.core:core-ktx:1.3.0' | |
implementation 'androidx.appcompat:appcompat:1.1.0' | |
implementation 'androidx.constraintlayout:constraintlayout:1.1.3' | |
implementation "androidx.recyclerview:recyclerview:1.1.0" | |
implementation 'androidx.work:work-runtime:2.2.0' | |
testImplementation 'junit:junit:4.12' | |
androidTestImplementation 'androidx.test.ext:junit:1.1.1' | |
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' | |
// #################### While running as a app uncomment ###################### | |
/*implementation 'com.google.code.gson:gson:2.8.6' | |
implementation 'com.android.volley:volley:1.2.1' | |
implementation project(":libOne") | |
implementation project(":vpnTwo") | |
implementation files('libs\\network.jar')*/ | |
// don't want to embed in | |
implementation('androidx.appcompat:appcompat:1.2.0') | |
// ##################### While building FAT ARR uncomment if want to add ################ | |
embed 'com.google.code.gson:gson:2.8.6' | |
embed 'com.android.volley:volley:1.2.1' | |
embed project(":libOne") | |
embed project(":vpnTwo") | |
embed files('libs\\network.jar') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment