From ca95d712e7ca4006a2fe2e5049f8de1f83702174 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Mar=C3=ADa?= Date: Sat, 14 Aug 2021 16:48:47 +0200 Subject: [PATCH] Include components to publishing --- .gitignore | 2 + .../test/java/com/jeluchu/components/Test.kt | 9 ++ build.gradle | 10 +- jchucomponentscompose/build.gradle | 97 +++++++++++++++++++ jchucomponentscompose/build.gradle.kts | 95 ------------------ jchucomponentscompose/proguard-rules.pro | 2 +- settings.gradle | 3 + settings.gradle.kts | 9 -- 8 files changed, 121 insertions(+), 106 deletions(-) create mode 100644 app/src/test/java/com/jeluchu/components/Test.kt create mode 100644 jchucomponentscompose/build.gradle delete mode 100644 jchucomponentscompose/build.gradle.kts create mode 100644 settings.gradle delete mode 100644 settings.gradle.kts diff --git a/.gitignore b/.gitignore index 7089a88e..9a087a16 100644 --- a/.gitignore +++ b/.gitignore @@ -89,3 +89,5 @@ lint/tmp/ .idea/compiler.xml .idea/misc.xml + +.idea/ diff --git a/app/src/test/java/com/jeluchu/components/Test.kt b/app/src/test/java/com/jeluchu/components/Test.kt new file mode 100644 index 00000000..ead3047d --- /dev/null +++ b/app/src/test/java/com/jeluchu/components/Test.kt @@ -0,0 +1,9 @@ +package com.jeluchu.components + +import com.jeluchu.jchucomponentscompose.core.extensions.strings.parseDate + +class Test { + + val g = "0".parseDate() + +} \ No newline at end of file diff --git a/build.gradle b/build.gradle index 93822434..6ed449ef 100644 --- a/build.gradle +++ b/build.gradle @@ -4,11 +4,19 @@ buildscript { mavenCentral() } dependencies { - classpath "com.android.tools.build:gradle:7.0.0" + classpath 'com.android.tools.build:gradle:7.0.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21" } } +allprojects { + repositories { + google() + mavenCentral() + maven { url 'https://jitpack.io' } + } +} + task clean(type: Delete) { delete rootProject.buildDir } \ No newline at end of file diff --git a/jchucomponentscompose/build.gradle b/jchucomponentscompose/build.gradle new file mode 100644 index 00000000..b50afb06 --- /dev/null +++ b/jchucomponentscompose/build.gradle @@ -0,0 +1,97 @@ +plugins { + id 'com.android.library' + id 'maven-publish' +} + +android { + + compileSdkVersion 30 + buildToolsVersion "30.0.3" + + defaultConfig { + minSdkVersion 21 + targetSdkVersion 30 + consumerProguardFiles "consumer-rules.pro" + } + + buildFeatures { + compose = true + } + + composeOptions { + kotlinCompilerExtensionVersion = "1.0.1" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + +} + +dependencies { + + // KOTLIN LIBRARY ------------------------------------------------------------------------------ + implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1' + implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.1' + + // JETPACK COMPOSE ----------------------------------------------------------------------------- + implementation 'androidx.compose.ui:ui:1.0.1' + implementation 'androidx.compose.material:material:1.0.1' + implementation 'androidx.compose.ui:ui-tooling-preview:1.0.1' + implementation 'androidx.activity:activity-compose:1.3.1' + debugImplementation 'androidx.compose.ui:ui-tooling:1.0.1' + implementation 'androidx.activity:activity-compose:1.3.1' + implementation 'androidx.compose.material:material-icons-extended:1.0.1' + implementation 'androidx.compose.foundation:foundation:1.0.1' + implementation 'androidx.compose.foundation:foundation-layout:1.0.1' + implementation 'androidx.compose.animation:animation:1.0.1' + implementation 'androidx.compose.runtime:runtime:1.0.1' + implementation 'androidx.compose.runtime:runtime-livedata:1.0.1' + implementation 'androidx.constraintlayout:constraintlayout-compose:1.0.0-beta02' + implementation 'androidx.navigation:navigation-compose:2.4.0-alpha06' + implementation 'androidx.activity:activity-compose:1.3.1' + + // ACCOMPANIST GOOGLE LIBRARY ------------------------------------------------------------------ + implementation 'com.google.accompanist:accompanist-systemuicontroller:0.16.1' + implementation 'com.google.accompanist:accompanist-navigation-animation:0.16.1' + + // ANDROIDX LIBRARY ---------------------------------------------------------------------------- + implementation 'androidx.core:core-ktx:1.6.0' + implementation 'androidx.appcompat:appcompat:1.3.1' + implementation 'androidx.browser:browser:1.3.0' + implementation 'androidx.preference:preference-ktx:1.1.1' + + // GOOGLE LIBRARY ------------------------------------------------------------------------------ + implementation 'com.google.android.material:material:1.4.0' + implementation 'com.google.code.gson:gson:2.8.7' + + // SQUAREUP LIBRARY ---------------------------------------------------------------------------- + implementation 'com.squareup.retrofit2:retrofit:2.9.0' + implementation 'com.squareup.retrofit2:converter-gson:2.9.0' + implementation 'com.squareup.okhttp3:logging-interceptor:4.9.1' + + // THIRD PARTY DEPENDENCIES -------------------------------------------------------------------- + implementation 'io.coil-kt:coil-compose:1.3.2' + +} + +afterEvaluate { + publishing { + publications { + release(MavenPublication) { + from components.release + groupId = "com.jeluchu" + artifactId = "jchucomponentscompose" + version = "0.0.2" + } + } + } +} \ No newline at end of file diff --git a/jchucomponentscompose/build.gradle.kts b/jchucomponentscompose/build.gradle.kts deleted file mode 100644 index 231da609..00000000 --- a/jchucomponentscompose/build.gradle.kts +++ /dev/null @@ -1,95 +0,0 @@ -plugins { - id("com.android.library") - kotlin("android") - id("maven-publish") -} - -publishing { - publications { - create("maven") { - groupId = "com.github.Jeluchu" - artifactId = "jchucomponents-compose" - version = "0.1.0" - } - } -} - -android { - - compileSdk = 30 - defaultConfig { - minSdk = 22 - targetSdk = 30 - } - - buildFeatures { - compose = true - } - - composeOptions { - kotlinCompilerExtensionVersion = "1.0.1" - } - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 - } - - packagingOptions { - resources.excludes.add("AndroidManifest.xml") - resources.excludes.add("LICENSE.txt") - resources.excludes.add("META-INF/DEPENDENCIES") - resources.excludes.add("META-INF/ASL2.0") - resources.excludes.add("META-INF/NOTICE") - resources.excludes.add("META-INF/LICENSE") - resources.excludes.add("*.kotlin_module") - } - -} - -dependencies { - - // KOTLIN LIBRARY ------------------------------------------------------------------------------ - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1") - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.1") - - // JETPACK COMPOSE ----------------------------------------------------------------------------- - implementation("androidx.compose.ui:ui:1.0.1") - implementation("androidx.compose.material:material:1.0.1") - implementation("androidx.compose.ui:ui-tooling-preview:1.0.1") - implementation("androidx.activity:activity-compose:1.3.1") - debugImplementation("androidx.compose.ui:ui-tooling:1.0.1") - implementation("androidx.activity:activity-compose:1.3.1") - implementation("androidx.compose.material:material-icons-extended:1.0.1") - implementation("androidx.compose.foundation:foundation:1.0.1") - implementation("androidx.compose.foundation:foundation-layout:1.0.1") - implementation("androidx.compose.animation:animation:1.0.1") - implementation("androidx.compose.runtime:runtime:1.0.1") - implementation("androidx.compose.runtime:runtime-livedata:1.0.1") - implementation("androidx.constraintlayout:constraintlayout-compose:1.0.0-beta02") - implementation("androidx.navigation:navigation-compose:2.4.0-alpha06") - implementation("androidx.activity:activity-compose:1.3.1") - - // ACCOMPANIST GOOGLE LIBRARY ------------------------------------------------------------------ - implementation("com.google.accompanist:accompanist-systemuicontroller:0.16.1") - implementation("com.google.accompanist:accompanist-navigation-animation:0.16.1") - - // ANDROIDX LIBRARY ---------------------------------------------------------------------------- - implementation("androidx.core:core-ktx:1.6.0") - implementation("androidx.appcompat:appcompat:1.3.1") - implementation("androidx.browser:browser:1.3.0") - implementation("androidx.preference:preference-ktx:1.1.1") - - // GOOGLE LIBRARY ------------------------------------------------------------------------------ - implementation("com.google.android.material:material:1.4.0") - implementation("com.google.code.gson:gson:2.8.7") - - // SQUAREUP LIBRARY ---------------------------------------------------------------------------- - implementation("com.squareup.retrofit2:retrofit:2.9.0") - implementation("com.squareup.retrofit2:converter-gson:2.9.0") - implementation("com.squareup.okhttp3:logging-interceptor:4.9.1") - - // THIRD PARTY DEPENDENCIES -------------------------------------------------------------------- - implementation("io.coil-kt:coil-compose:1.3.2") - -} \ No newline at end of file diff --git a/jchucomponentscompose/proguard-rules.pro b/jchucomponentscompose/proguard-rules.pro index ff59496d..481bb434 100644 --- a/jchucomponentscompose/proguard-rules.pro +++ b/jchucomponentscompose/proguard-rules.pro @@ -1,6 +1,6 @@ # Add project specific ProGuard rules here. # You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle.kts. +# proguardFiles setting in build.gradle. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 00000000..775a4743 --- /dev/null +++ b/settings.gradle @@ -0,0 +1,3 @@ +rootProject.name = "JchuComponentsCompose" +include ':jchucomponentscompose' +include ':app' diff --git a/settings.gradle.kts b/settings.gradle.kts deleted file mode 100644 index 6a1d30dd..00000000 --- a/settings.gradle.kts +++ /dev/null @@ -1,9 +0,0 @@ -dependencyResolutionManagement { - repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) - repositories { - google() - mavenCentral() - } -} -rootProject.name = "Comppose Components" -include(":app", ":jchucomponentscompose")