Skip to content
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.

Commit

Permalink
Import versions in plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanWang committed Jun 7, 2019
1 parent eb0520b commit f1301c6
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 22 deletions.
6 changes: 6 additions & 0 deletions .idea/kotlinScripting.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 16 additions & 16 deletions app/build.gradle
Expand Up @@ -10,8 +10,8 @@ apply from: '../spotless.gradle'
group = APP_GROUP

android {
compileSdkVersion kau.targetSdk
buildToolsVersion kau.buildTools
compileSdkVersion kau.Versions.targetSdk
buildToolsVersion kau.Versions.buildTools

androidGitVersion {
codeFormat = 'MMNNPPXX'
Expand All @@ -21,8 +21,8 @@ android {

defaultConfig {
applicationId "${project.APP_GROUP}." + project.APP_ID.toLowerCase(Locale.CANADA)
minSdkVersion kau.minSdk
targetSdkVersion kau.targetSdk
minSdkVersion kau.Versions.minSdk
targetSdkVersion kau.Versions.targetSdk
versionCode androidGitVersion.code()
versionName androidGitVersion.name()
multiDexEnabled true
Expand Down Expand Up @@ -175,15 +175,15 @@ repositories {
dependencies {
implementation 'androidx.exifinterface:exifinterface:1.0.0'

androidTestImplementation kauDependency.kotlinTest
androidTestImplementation kauDependency.espresso
androidTestImplementation kauDependency.testRules
androidTestImplementation kauDependency.testRunner
androidTestImplementation kau.Dependencies.kotlinTest
androidTestImplementation kau.Dependencies.espresso
androidTestImplementation kau.Dependencies.testRules
androidTestImplementation kau.Dependencies.testRunner
androidTestImplementation "org.jetbrains.kotlin:kotlin-reflect:${KOTLIN}"

testImplementation kauDependency.kotlinTest
testImplementation kau.Dependencies.kotlinTest
testImplementation "org.jetbrains.kotlin:kotlin-reflect:${KOTLIN}"
testImplementation kauDependency.junit
testImplementation kau.Dependencies.junit

implementation "org.jetbrains.kotlin:kotlin-stdlib:${KOTLIN}"

Expand Down Expand Up @@ -214,18 +214,18 @@ dependencies {

// androidTestImplementation "io.mockk:mockk:${MOCKK}"

implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:${kau.coroutines}"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:${kau.Versions.coroutines}"

implementation "org.apache.commons:commons-text:${COMMONS_TEXT}"

implementation "com.devbrackets.android:exomedia:${EXOMEDIA}"

implementation "com.mikepenz:fastadapter-extensions:${kau.fastAdapter}@aar"
implementation "com.mikepenz:fastadapter-extensions:${kau.Versions.fastAdapter}@aar"

//noinspection GradleDependency
implementation "com.github.bumptech.glide:okhttp3-integration:${kau.glide}"
implementation "com.github.bumptech.glide:okhttp3-integration:${kau.Versions.glide}"
//noinspection GradleDependency
kapt "com.github.bumptech.glide:compiler:${kau.glide}"
kapt "com.github.bumptech.glide:compiler:${kau.Versions.glide}"

implementation "com.fasterxml.jackson.core:jackson-databind:${JACKSON}"

Expand All @@ -243,8 +243,8 @@ dependencies {
implementation "com.github.Raizlabs.DBFlow:dbflow-kotlinextensions:${DBFLOW}"

//Icons
implementation "com.mikepenz:material-design-iconic-typeface:${kau.iconicsMaterial}@aar"
implementation "com.mikepenz:community-material-typeface:${kau.iconicsCommunity}@aar"
implementation "com.mikepenz:material-design-iconic-typeface:${kau.Versions.iconicsMaterial}@aar"
implementation "com.mikepenz:community-material-typeface:${kau.Versions.iconicsCommunity}@aar"

implementation "org.jsoup:jsoup:${JSOUP}"

Expand Down
5 changes: 1 addition & 4 deletions build.gradle
Expand Up @@ -7,7 +7,6 @@ buildscript {
}

dependencies {
classpath "ca.allanwang:kau:${KAU}"
// classpath 'com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta02'
classpath "com.android.tools.build:gradle:${ANDROID_GRADLE}"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${KOTLIN}"
Expand All @@ -20,14 +19,12 @@ buildscript {
wrapper.setDistributionType(Wrapper.DistributionType.ALL)
}

apply plugin: "ca.allanwang.kau"

task clean(type: Delete) {
delete rootProject.buildDir
}

task generateChangelogMd() {
def changelog = kauChangelog.generate("${project.rootDir}/app/src/main/res/xml/frost_changelog.xml")
def changelog = kau.ChangelogGenerator.generate("${project.rootDir}/app/src/main/res/xml/frost_changelog.xml", "${project.rootDir}/docs/Changelog.md")
// If we have no changelog, something is wrong
def entry = changelog[0]
def whatsNewFile = new File("${project.rootDir}/app/src/main/play/en-US/whatsnew")
Expand Down
2 changes: 2 additions & 0 deletions buildSrc/.gitignore
@@ -0,0 +1,2 @@
.gradle/
build/
14 changes: 14 additions & 0 deletions buildSrc/build.gradle.kts
@@ -0,0 +1,14 @@
plugins {
`kotlin-dsl`
}

repositories {
jcenter()
maven("https://jitpack.io")
}

val KAU: String = "df94b2f"

dependencies {
implementation("ca.allanwang.kau:gradle-plugin:$KAU")
}
3 changes: 3 additions & 0 deletions buildSrc/src/main/kotlin/Versions.kt
@@ -0,0 +1,3 @@
object Versions {

}
2 changes: 1 addition & 1 deletion gradle.properties
Expand Up @@ -16,7 +16,7 @@ org.gradle.daemon = true
APP_ID=Frost
APP_GROUP=com.pitchedapps

KAU=c6a5b4e
KAU=1ac55ac
KOTLIN=1.3.31

# https://mvnrepository.com/artifact/com.android.tools.build/gradle?repo=google
Expand Down
4 changes: 3 additions & 1 deletion settings.gradle.kts
@@ -1 +1,3 @@
include(":app")
include(":app", ":gradle-plugin")

project(":gradle-plugin").projectDir = file("buildSrc")

0 comments on commit f1301c6

Please sign in to comment.