Skip to content
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

Composite build pt-ii #49

Draft
wants to merge 2 commits into
base: composite_builds
Choose a base branch
from
Draft

Conversation

Adi-MMandroid
Copy link

@Adi-MMandroid Adi-MMandroid commented Jan 3, 2023

Formatted data module for composite build

TODO
Move away from buildSrc module name

@Adi-MMandroid Adi-MMandroid changed the title Data module formatted Composite build pt-ii Jan 3, 2023
Comment on lines 35 to 37
project.extensions.getByType<LibraryExtension>().apply {
configureAndroidLibraryBlock(project)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do these lines of code contain all of the following?

android {
  compileSdk = 31

  defaultConfig {
    minSdk = (AppVersions.MIN_SDK)
    targetSdk = (AppVersions.TARGET_SDK)
    testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
  }

  buildTypes {
    getByName("release") {
      isMinifyEnabled = false
      proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
    }
  }

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah @shubhamsinghmutualmobile
same function as made by @anmolvermamm

fun LibraryExtension.configureAndroidLibraryBlock(project: Project) {
compileSdkVersion = AppVersions.COMPILE_SDK

defaultConfig {
minSdk = (AppVersions.MIN_SDK)
targetSdk = (AppVersions.TARGET_SDK)
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
getByName("release") {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}

buildFeatures.compose = true

composeOptions {
kotlinCompilerExtensionVersion = Lib.Androidx.composeVersion
}
packagingOptions {
resources.excludes.add("META-INF/LICENSE.txt")
resources.excludes.add("META-INF/NOTICE.txt")
resources.excludes.add("LICENSE.txt")
resources.excludes.add("/META-INF/{AL2.0,LGPL2.1}")
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
project.tasks.withType().configureEach {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
}
}

@Adi-MMandroid Adi-MMandroid marked this pull request as draft January 5, 2023 13:58
@Adi-MMandroid Adi-MMandroid self-assigned this Jan 5, 2023
@Adi-MMandroid Adi-MMandroid added the wip Task is already a work-in-progress label Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wip Task is already a work-in-progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants