Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
vaclav.souhrada committed May 29, 2019
1 parent 95567b2 commit 9f79702
Show file tree
Hide file tree
Showing 86 changed files with 2,430 additions and 0 deletions.
71 changes: 71 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Created by .ignore support plugin (hsz.mobi)
### Java template
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
#*.jar
*.war
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
### Android template
# Built application files
*.apk
*.ap_

# Files for the ART/Dalvik VM
*.dex

# Generated files
bin/
gen/
out/

# Gradle files
.gradle/
build/

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/

# Android Studio Navigation editor temp files
.navigation/

# Android Studio captures folder
captures/

# Intellij
*.iml
.idea

# Keystore files
*.jks

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild

# Google Services (e.g. APIs or Firebase)
google-services.json

# Freeline
freeline.py
freeline/
freeline_project_description.json

6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Change Log
==========

Version 1.0.0-beta01 *(2019-05-29)
--------------------
* Initial version
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Kotlin Android Architecture Library - Kaal - by eMan

### Kaal Core
TBD

### Kaal Domain
TBD

### Kaal Presentation
TBD

#### Responsible Persons
* Vaclav Souhrada
- Roman Holomek
- Stefan Toth
39 changes: 39 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import org.gradle.kotlin.dsl.repositories

buildscript {

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

dependencies {
// https://github.com/gradle/kotlin-dsl/issues/1291
classpath(GradlePlugins.androidGradle)

// Kotlin Grade plugin
classpath(GradlePlugins.kotlin)

// Build Tool to generate Kotlin KDoc documentation
classpath(GradlePlugins.dokka)

classpath(GradlePlugins.mavenPublish)

classpath(GradlePlugins.androidMavenGradle)

classpath(GradlePlugins.bintrayGradle)
}
}

allprojects {

repositories {
google()
jcenter()
}
}

tasks.create<Delete>("clean") {
delete(rootProject.buildDir)
}
2 changes: 2 additions & 0 deletions buildSrc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/build
.gradle
8 changes: 8 additions & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

plugins {
`kotlin-dsl`
}
repositories {
jcenter()
}

Empty file added buildSrc/settings.gradle.kts
Empty file.
111 changes: 111 additions & 0 deletions buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
import org.gradle.api.JavaVersion
import kotlin.String


/* ============================= BUILD-PLUGINS ======================= */

private object Versions {

val supportLib = "1.0.0"
val archLifecycle = "2.1.0-alpha03"
val navigationComponent = "2.1.0-alpha02"
val constraintLayout = "1.1.2"

val kotlin = "1.3.30"
val coroutinesCore = "1.1.1"
val coroutinesAndroid = "1.1.1"
val dokka = "0.9.17"

val gradle = "5.2.1"
//val gradleBuildTools = "3.5.0-alpha07"
val gradleBuildTools = "3.4.0"

val mavenPublish = "3.6.2"
val mavenGradleGithub = "1.5"
val bintrayGradle = "1.8.4"

val timber = "4.7.1"
val timberKtx = "0.1.0"
val mirrorLink = "1.1"
val koin = "2.0.0-beta-1"
val espresso = "3.0.1"
val junit = "4.12"
val kotlinTest = "3.3.0"

}


/* ============================= BUILD-PLUGINS ======================= */

object GradlePlugins {
val encoding = "UTF-8"
val gradle = Versions.gradle

val androidGradle = "com.android.tools.build:gradle:${Versions.gradleBuildTools}"
val kotlin = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlin}"
val dokka = "org.jetbrains.dokka:dokka-gradle-plugin:${Versions.dokka}"
val mavenPublish = "digital.wup:android-maven-publish:${Versions.mavenPublish}"
val androidMavenGradle = "com.github.dcendents:android-maven-gradle-plugin:${Versions.mavenGradleGithub}"
val bintrayGradle = "com.jfrog.bintray.gradle:gradle-bintray-plugin:${Versions.bintrayGradle}"
}

/* ============================= ANDROID ============================= */

object Android {
val applicationId = "cz.eman.kaal.sample"
val groupId = "cz.eman.kaal"

val minSdk = 21
val targetSdk = 28
val compileSdk = 28

val versionCode = 1
val versionName = "1"

val testInstrumentRunner = "android.support.test.runner.AndroidJUnitRunner"
val sourceCompatibilityJava = JavaVersion.VERSION_1_8
val targetCompatibilityJava = JavaVersion.VERSION_1_8
}

object Dependencies {
/* ============================= KOTLIN ============================== */

object Kotlin {
val kotlinStbLib = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${Versions.kotlin}"
val coroutinesCore =
"org.jetbrains.kotlinx:kotlinx-coroutines-core:${Versions.coroutinesCore}"
val coroutinesAndroid =
"org.jetbrains.kotlinx:kotlinx-coroutines-android:${Versions.coroutinesAndroid}"
}

/* ============================= LIBS ================================ */

object Libs {
val appCompat = "androidx.appcompat:appcompat:${Versions.supportLib}"
val supportFragment = "androidx.fragment:fragment:${Versions.supportLib}"
val constraintLayout =
"androidx.constraintlayout:constraintlayout:${Versions.constraintLayout}"
val lifecycleExtension = "androidx.lifecycle:lifecycle-extensions:${Versions.archLifecycle}"
val viewModelKtx = "androidx.lifecycle:lifecycle-viewmodel-ktx:${Versions.archLifecycle}"
val navigationFragment =
"androidx.navigation:navigation-fragment-ktx:${Versions.navigationComponent}"
val navigationUi = "androidx.navigation:navigation-ui-ktx:${Versions.navigationComponent}"

val koinScope =
"org.koin:koin-androidx-scope:${Versions.koin}" // Koin Android Scope feature
val koinAndroid = "org.koin:koin-android:${Versions.koin}"
val koinViewModel =
"org.koin:koin-androidx-viewmodel:${Versions.koin}" // Koin Android ViewModel feature

val timber = "com.jakewharton.timber:timber:${Versions.timber}"
val timberKtx = "cz.eman.logger:timber-ktx:${Versions.timberKtx}"
}

/* ============================= TEST-LIBS =========================== */

object TestLibs {
val junit = "junit:junit:${Versions.junit}"
val espressoCore = "com.android.support.test.espresso:espresso-core:${Versions.espresso}"
val kotlinTest = "io.kotlintest:kotlintest-runner-junit5:${Versions.kotlinTest}"
}
}
19 changes: 19 additions & 0 deletions buildSrc/src/main/kotlin/GradleExt.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import org.gradle.api.Project
import java.io.ByteArrayOutputStream

fun Project.findPropertyOrNull(s: String) = findProperty(s) as String?

fun Project.getProperty(propertyName: String) = property(propertyName)

/**
* Gets number of commits in projects repository.
* @return Number of commits in projects repository.
*/
fun Project.getGitCommits(): Int {
val stdout = ByteArrayOutputStream()
exec {
commandLine = listOf("git", "rev-list", "HEAD", "--count")
standardOutput = stdout
}
return Integer.parseInt(stdout.toString().trim())
}
25 changes: 25 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Project-wide Gradle settings.

# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.

# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m

# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
android.useAndroidX=true
android.enableJetifier=true

# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official

#Core Toolking SDK version
version=1.0.0-beta01
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Wed Mar 13 17:37:43 CET 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-all.zip
Loading

0 comments on commit 9f79702

Please sign in to comment.