Skip to content

Commit

Permalink
Update for 0.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Flavio Veizi committed Jun 13, 2020
1 parent e45c212 commit 279d7d4
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 47 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ allprojects {

```groovy
dependencies {
implementation 'dev.fanie:stateful:0.2.3'
kapt 'dev.fanie:stateful-compiler:0.2.3'
implementation 'dev.fanie:stateful:0.3.1'
kapt 'dev.fanie:stateful-compiler:0.3.1'
}
```

Expand Down
40 changes: 0 additions & 40 deletions app/build.gradle

This file was deleted.

36 changes: 36 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
plugins {
apply(Plugins.APP)
apply(Plugins.KOTLIN_ANDROID)
apply(Plugins.KOTLIN_ANDROID_EXTENSIONS)
apply(Plugins.KOTLIN_KAPT)
}

android {
compileSdkVersion(29)
defaultConfig {
applicationId = "dev.fanie.statefulapp"
minSdkVersion(19)
targetSdkVersion(29)
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
}

dependencies {
include(implementation = Dependencies.Kotlin.STDLIB)
implementation("androidx.appcompat:appcompat:1.1.0")
implementation("androidx.core:core-ktx:1.3.0")
implementation("androidx.constraintlayout:constraintlayout:1.1.3")
include(testImplementation = Dependencies.Testing.JUNIT)
androidTestImplementation("androidx.test.ext:junit:1.1.1")
androidTestImplementation("androidx.test.espresso:espresso-core:3.2.0")

if (Props.Local.DEV_MODE) {
implementation(project(Modules.STATEFUL))
kapt(project(Modules.STATEFUL_COMPILER))
} else {
implementation("dev.fanie:stateful:${Project.VERSION}")
kapt("dev.fanie:stateful-compiler:${Project.VERSION}")
}
}
6 changes: 2 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@ allprojects {

subprojects {
afterEvaluate {
if (!hasProperty("android")) {
dependencies {
add("implementation", (fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar")))))
}
dependencies {
add("implementation", (fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar")))))
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions buildSrc/src/main/kotlin/Plugins.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import type.Plugin

object Plugins {
val APP = Plugin("com.android.application")
val LIBRARY = Plugin("java-library")
val KOTLIN = Plugin("kotlin")
val KOTLIN_ANDROID = Plugin("kotlin-android")
val KOTLIN_ANDROID_EXTENSIONS = Plugin("kotlin-android-extensions")
val KOTLIN_KAPT = Plugin("kotlin-kapt")
val MAVEN_PUBLISH = Plugin("maven-publish")
}
12 changes: 11 additions & 1 deletion buildSrc/src/main/kotlin/Props.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,20 @@ import java.io.FileInputStream
import java.util.Properties

object Props {
object Local {
private val localProperties: Properties by lazy {
val properties = Properties()
properties.load(FileInputStream(File("local.properties")))
properties
}

val DEV_MODE: Boolean = localProperties["dev.mode"] as? Boolean ?: false
}

object GitHub {
private val githubProperties: Properties by lazy {
val properties = Properties()
properties.load(FileInputStream(File( "github.properties")))
properties.load(FileInputStream(File("github.properties")))
properties
}

Expand Down

0 comments on commit 279d7d4

Please sign in to comment.