-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f056fd5
commit 39743ba
Showing
18 changed files
with
151 additions
and
259 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,3 +31,4 @@ google-services.json | |
|
||
# Android Profiling | ||
*.hprof | ||
.kotlin |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
// Top-level build file where you can add configuration options common to all sub-projects/modules. | ||
plugins { | ||
alias(libs.plugins.android.application) apply false | ||
alias(libs.plugins.kotlin.android) apply false | ||
alias(libs.plugins.android.library) apply false | ||
alias(mobilex.plugins.composeCompiler) apply false | ||
alias(mobilex.plugins.androidHilt) apply false | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import java.util.Properties | ||
|
||
plugins { | ||
`kotlin-dsl` | ||
} | ||
|
||
repositories { | ||
google() | ||
mavenCentral() | ||
mavenLocal() | ||
gradlePluginPortal() | ||
maven { | ||
val ghUsername = System.getenv("GH_USERNAME") ?: getLocalProperty("GH_USERNAME") | ||
val ghPassword = System.getenv("GH_TOKEN") ?: getLocalProperty("GH_TOKEN") | ||
url = uri("https://maven.pkg.github.com/${ghUsername}/REPOSITORY") | ||
credentials { | ||
username = ghUsername | ||
password = ghPassword | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation(libs.corePlugins) | ||
} | ||
|
||
fun getLocalProperty(propertyName: String): String { | ||
val localProperties = Properties().apply { | ||
val localPropertiesFile = File(rootDir, "local.properties") | ||
if (localPropertiesFile.exists()) { | ||
load(localPropertiesFile.inputStream()) | ||
} | ||
} | ||
|
||
return localProperties.getProperty(propertyName) ?: run { | ||
throw NoSuchFieldException("Not defined property: $propertyName") | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
dependencyResolutionManagement { | ||
versionCatalogs { | ||
create("libs") { | ||
from(files("../gradle/libs.versions.toml")) | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package vn.core.libx.buildSrc | ||
|
||
object Configs { | ||
|
||
object Artifact { | ||
const val GROUP_ID = "vn.core.libs" | ||
const val ARTIFACT_COMPOSE_ID = "compose" | ||
const val ARTIFACT_MDC_ID = "mdc" | ||
const val VERSION = "1.0.0" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package vn.core.libx.buildSrc | ||
|
||
class MyClass { | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,9 @@ | ||
[versions] | ||
compileSdk = "34" | ||
minSdk = "24" | ||
agp = "8.6.0" | ||
kotlin = "1.9.24" | ||
coreKtx = "1.13.1" | ||
junit = "4.13.2" | ||
junitVersion = "1.2.1" | ||
espressoCore = "3.6.1" | ||
appcompat = "1.7.0" | ||
material = "1.12.0" | ||
uiTextGoogleFonts = "1.6.8" | ||
corePlugins = "1.0.1" | ||
domain = "1.0.0" | ||
constraintlayout = "2.1.4" | ||
lifecycleLivedataKtx = "2.8.4" | ||
lifecycleViewmodelKtx = "2.8.4" | ||
navigationFragmentKtx = "2.7.7" | ||
navigationUiKtx = "2.7.7" | ||
lifecycleRuntimeKtx = "2.8.4" | ||
activityCompose = "1.9.1" | ||
composeBom = "2024.08.00" | ||
pagingComposeAndroid = "3.3.2" | ||
paging = "3.3.2" | ||
splashscreen = "1.0.1" | ||
|
||
[libraries] | ||
core-domain = { group = "vn.core.libx", name = "domain", version.ref = "domain" } | ||
|
||
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" } | ||
junit = { group = "junit", name = "junit", version.ref = "junit" } | ||
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" } | ||
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" } | ||
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" } | ||
material = { group = "com.google.android.material", name = "material", version.ref = "material" } | ||
androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" } | ||
androidx-ui-text-google-fonts = { group = "androidx.compose.ui", name = "ui-text-google-fonts", version.ref = "uiTextGoogleFonts" } | ||
androidx-lifecycle-livedata-ktx = { group = "androidx.lifecycle", name = "lifecycle-livedata-ktx", version.ref = "lifecycleLivedataKtx" } | ||
androidx-lifecycle-viewmodel-ktx = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version.ref = "lifecycleViewmodelKtx" } | ||
androidx-navigation-fragment-ktx = { group = "androidx.navigation", name = "navigation-fragment-ktx", version.ref = "navigationFragmentKtx" } | ||
androidx-navigation-ui-ktx = { group = "androidx.navigation", name = "navigation-ui-ktx", version.ref = "navigationUiKtx" } | ||
androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" } | ||
androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" } | ||
androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" } | ||
androidx-ui = { group = "androidx.compose.ui", name = "ui" } | ||
androidx-ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" } | ||
androidx-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" } | ||
androidx-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" } | ||
androidx-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" } | ||
androidx-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" } | ||
androidx-material3 = { group = "androidx.compose.material3", name = "material3" } | ||
androidx-material3-icons = { group = "androidx.compose.material", name = "material-icons-extended" } | ||
androidx-paging-compose = { group = "androidx.paging", name = "paging-compose", version.ref = "paging" } | ||
androidx-core-splashscreen = { group = "androidx.core", name = "core-splashscreen", version.ref = "splashscreen" } | ||
corePlugins = { group = "vn.core.libs", name = "plugins", version.ref = "corePlugins" } | ||
domain = { group = "vn.core.libs", name = "domain", version.ref = "domain" } | ||
|
||
[plugins] | ||
android-application = { id = "com.android.application", version.ref = "agp" } | ||
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } | ||
android-library = { id = "com.android.library", version.ref = "agp" } | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Sun Sep 01 14:58:09 ICT 2024 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,94 +1,28 @@ | ||
import vn.core.libx.buildSrc.Configs | ||
|
||
plugins { | ||
alias(libs.plugins.android.library) | ||
alias(libs.plugins.kotlin.android) | ||
id("maven-publish") | ||
vn.core.plugins.androidLibrary | ||
vn.core.plugins.androidCompose | ||
vn.core.plugins.androidPublishing | ||
} | ||
|
||
android { | ||
namespace = "vn.core.libx.composex" | ||
compileSdk = libs.versions.compileSdk.get().toInt() | ||
|
||
defaultConfig { | ||
minSdk = libs.versions.minSdk.get().toInt() | ||
|
||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
consumerProguardFiles("consumer-rules.pro") | ||
} | ||
|
||
buildTypes { | ||
release { | ||
isMinifyEnabled = false | ||
proguardFiles( | ||
getDefaultProguardFile("proguard-android-optimize.txt"), | ||
"proguard-rules.pro" | ||
) | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
} | ||
buildFeatures { | ||
compose = true | ||
} | ||
composeOptions { | ||
kotlinCompilerExtensionVersion = "1.5.14" | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation(libs.core.domain) | ||
|
||
implementation(libs.androidx.core.ktx) | ||
implementation(libs.androidx.appcompat) | ||
implementation(libs.material) | ||
implementation(libs.androidx.constraintlayout) | ||
implementation(libs.androidx.lifecycle.livedata.ktx) | ||
implementation(libs.androidx.lifecycle.viewmodel.ktx) | ||
implementation(libs.androidx.navigation.fragment.ktx) | ||
implementation(libs.androidx.navigation.ui.ktx) | ||
implementation(libs.androidx.lifecycle.runtime.ktx) | ||
implementation(libs.androidx.activity.compose) | ||
implementation(platform(libs.androidx.compose.bom)) | ||
implementation(libs.androidx.ui) | ||
implementation(libs.androidx.ui.graphics) | ||
implementation(libs.androidx.ui.tooling.preview) | ||
implementation(libs.androidx.material3) | ||
implementation(libs.androidx.paging.compose) | ||
implementation(libs.androidx.ui.text.google.fonts) | ||
testImplementation(libs.junit) | ||
androidTestImplementation(libs.androidx.junit) | ||
androidTestImplementation(libs.androidx.espresso.core) | ||
androidTestImplementation(platform(libs.androidx.compose.bom)) | ||
androidTestImplementation(libs.androidx.ui.test.junit4) | ||
debugImplementation(libs.androidx.ui.tooling) | ||
debugImplementation(libs.androidx.ui.test.manifest) | ||
implementation(libs.domain) | ||
} | ||
|
||
publishing { | ||
val ghUsername = System.getenv("USERNAME") | ||
val ghPassword = System.getenv("TOKEN") | ||
repositories { | ||
maven { | ||
name = "GitHubPackages" | ||
url = uri("https://maven.pkg.github.com/${ghUsername}/android-components") | ||
credentials { | ||
username = ghUsername | ||
password = ghPassword | ||
} | ||
} | ||
} | ||
publications { | ||
create<MavenPublication>("mavenJava") { | ||
create<MavenPublication>(Configs.Artifact.ARTIFACT_COMPOSE_ID) { | ||
afterEvaluate { | ||
from(components["release"]) | ||
from(components["all"]) | ||
} | ||
groupId = "vn.core.libx-ui" // Replace with your GitHub username | ||
artifactId = "composex" | ||
version = "1.0.2" // Set your desired version here | ||
groupId = Configs.Artifact.GROUP_ID // Replace with your GitHub username | ||
artifactId = Configs.Artifact.ARTIFACT_COMPOSE_ID | ||
version = Configs.Artifact.VERSION // Set your desired version here | ||
} | ||
} | ||
} | ||
} |
Empty file.
Oops, something went wrong.