Skip to content

Commit

Permalink
Migration to Material theme and attributes for colors
Browse files Browse the repository at this point in the history
  • Loading branch information
marcohc committed Sep 11, 2022
1 parent de03942 commit f7bde58
Show file tree
Hide file tree
Showing 31 changed files with 240 additions and 196 deletions.
21 changes: 4 additions & 17 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,33 +1,20 @@
buildscript {

apply from: 'config/dependencies.gradle'

repositories {
jcenter()
mavenCentral()
google()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
classpath gradlePlugins.gradle
}
}

allprojects {

ext {
androidApplicationId = 'com.marcohc.robotocalendar'
androidBuildToolsVersion = "28.0.3"
androidMinSdkVersion = 14
androidTargetSdkVersion = 28
androidCompileSdkVersion = 28
androidVersionCode = 1
androidVersionName = "3.6.1"
}

repositories {
jcenter()
mavenCentral()
maven { url "https://jitpack.io" }
google()
}
}
}
21 changes: 21 additions & 0 deletions config/android-application.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apply plugin: "com.android.application"

android {

buildToolsVersion versions.android.buildTools
compileSdkVersion versions.android.compileSdk

compileOptions {
encoding "UTF-8"
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

defaultConfig {
targetSdkVersion versions.android.targetSdk
minSdkVersion versions.android.minSdk
applicationId versions.app.packageName
versionCode versions.app.code
versionName versions.app.version
}
}
39 changes: 39 additions & 0 deletions config/android-library.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
apply plugin: "com.android.library"

apply from: "../config/publishToMavenLocal.gradle"

android {

buildToolsVersion versions.android.buildTools
compileSdkVersion versions.android.compileSdk

compileOptions {
encoding "UTF-8"
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

defaultConfig {
targetSdkVersion versions.android.targetSdk
minSdkVersion versions.android.minSdk
}

lintOptions {
abortOnError true
checkAllWarnings true
warningsAsErrors true
checkReleaseBuilds false
ignoreWarnings false
quiet true
}

// sourceSets {
// androidTest.java.srcDirs += "src/androidTest/kotlin"
// main.java.srcDirs += "src/main/kotlin"
// test.java.srcDirs += "src/test/kotlin"
// }
}

dependencies {
// implementation(libraries.kotlin) { exclude group: 'org.jetbrains' }
}
25 changes: 25 additions & 0 deletions config/dependencies.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
ext.versions = [
android: [
minSdk : 23,
compileSdk : 32,
targetSdk : 32,
buildTools : "30.0.3",
packageName: "com.marcohc.robotocalendar"
],
app : [
code : 2,
version: "4.0.0",
],
]

ext.gradlePlugins = [
gradle: "com.android.tools.build:gradle:7.2.1",
]

ext.libraries = [
appCompat : "androidx.appcompat:appcompat:1.4.2",
calligraphy : "io.github.inflationx:calligraphy3:3.1.1",
calligraphyViewPump : "io.github.inflationx:viewpump:2.0.3",
jetbrainsAnnotations: "org.jetbrains:annotations:23.0.0",
material : "com.google.android.material:material:1.6.1",
]
22 changes: 22 additions & 0 deletions config/publishToMavenLocal.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apply plugin: 'maven-publish'

android {
publishing {
singleVariant("release") {
withSourcesJar()
withJavadocJar()
}
}
}
afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from components.release
groupId LIBRARY_GROUP
artifactId this.name
version = versions.app.version
}
}
}
}
10 changes: 10 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
android.debug.obsoleteApi=false
android.enableJetifier=true
android.useAndroidX=true
org.gradle.daemon=true
org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.parallel=true
org.gradle.configureondemand=true
org.gradle.caching=true
# Necessary to publish library locally
LIBRARY_GROUP=com.github.marcohc
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Thu Oct 04 09:47:10 CEST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
35 changes: 0 additions & 35 deletions library/build.gradle

This file was deleted.

13 changes: 0 additions & 13 deletions library/src/main/res/values/colors.xml

This file was deleted.

9 changes: 9 additions & 0 deletions robotocalendarview/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apply from: "../config/android-library.gradle"

dependencies {
implementation libraries.appCompat
implementation libraries.calligraphy
implementation libraries.calligraphyViewPump
implementation libraries.jetbrainsAnnotations
implementation libraries.material
}
File renamed without changes.
Loading

0 comments on commit f7bde58

Please sign in to comment.