Skip to content

Commit

Permalink
Merge pull request #52 from yshrsmz/dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
yshrsmz authored Jun 11, 2021
2 parents 3203aae + f225357 commit 33c37b6
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 47 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,5 @@ secret.properties

.envrc
*-sec.asc

*.hprof
8 changes: 8 additions & 0 deletions CHANGELOGS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres
to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.8.0] - 2021-06-11

### Changed

- Kotlin 1.5.10
- Android Gradle Plugin 4.2.1
- Gradle Wrapper 6.9

## [0.7.1] - 2021-06-09

### Changed
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
package com.codingfeline.buildkonfig.buildsrc

object Versions {
const val compileSdk = 29
const val kotlin = "1.4.0"
const val dokka = "1.4.20"
const val compileSdk = 30
const val kotlin = "1.5.10"
const val dokka = "1.4.32"
const val jvmTarget = "1.8"
const val benManesVersionsPlugin = "0.29.0"
const val gradle = "6.6"
const val benManesVersionsPlugin = "0.39.0"
const val gradle = "6.9"
}

object Dependencies {
const val androidPlugin = "com.android.tools.build:gradle:4.0.1"
const val androidPlugin = "com.android.tools.build:gradle:4.2.1"
const val kotlinPlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlin}"
const val dokkaPlugin = "org.jetbrains.dokka:dokka-gradle-plugin:${Versions.dokka}"
const val gradleVersionsPlugin = "com.github.ben-manes:gradle-versions-plugin:${Versions.benManesVersionsPlugin}"
const val pluginPublishPlugin = "com.gradle.publish:plugin-publish-plugin:0.12.0"
const val mavenPublishPlugin = "com.vanniktech:gradle-maven-publish-plugin:0.13.0"
const val pluginPublishPlugin = "com.gradle.publish:plugin-publish-plugin:0.15.0"
const val mavenPublishPlugin = "com.vanniktech:gradle-maven-publish-plugin:0.14.2"

const val kotlinPoet = "com.squareup:kotlinpoet:1.6.0"
const val junit = "junit:junit:4.13"
const val truth = "com.google.truth:truth:1.0.1"
const val kotlinPoet = "com.squareup:kotlinpoet:1.8.0"
const val junit = "junit:junit:4.13.2"
const val truth = "com.google.truth:truth:1.1.3"
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class BuildKonfigPluginFlavorTest {
| packageName = "com.example"
|
| defaultConfigs {
| buildConfigField 'STRING', 'value', 'defaultValue'
| buildConfigField 'STRING', 'stringValue', 'defaultValue'
| }
|}
|$buildFileMPPConfig
Expand Down Expand Up @@ -87,7 +87,7 @@ class BuildKonfigPluginFlavorTest {
|import kotlin.String
|
|internal object BuildKonfig {
| val value: String = "defaultValue"
| public val stringValue: String = "defaultValue"
|}
|
""".trimMargin()
Expand All @@ -113,10 +113,10 @@ class BuildKonfigPluginFlavorTest {
| packageName = "com.example"
|
| defaultConfigs {
| buildConfigField 'STRING', 'value', 'defaultValue'
| buildConfigField 'STRING', 'stringValue', 'defaultValue'
| }
| defaultConfigs("dev") {
| buildConfigField 'STRING', 'value', 'devDefaultValue'
| buildConfigField 'STRING', 'stringValue', 'devDefaultValue'
| }
|}
|$buildFileMPPConfig
Expand All @@ -142,7 +142,7 @@ class BuildKonfigPluginFlavorTest {

val commonResult = File(buildDir, "commonMain/com/example/BuildKonfig.kt")
Truth.assertThat(commonResult.readText())
.contains("val value: String = \"devDefaultValue\"")
.contains("val stringValue: String = \"devDefaultValue\"")

val jvmResult = File(buildDir, "jvmMain/com/example/BuildKonfig.kt")
Truth.assertThat(jvmResult.exists()).isFalse()
Expand All @@ -164,13 +164,13 @@ class BuildKonfigPluginFlavorTest {
| packageName = "com.example"
|
| defaultConfigs {
| buildConfigField 'STRING', 'value', 'defaultValue'
| buildConfigField 'STRING', 'stringValue', 'defaultValue'
| }
| defaultConfigs("dev") {
| buildConfigField 'STRING', 'value', 'devDefaultValue'
| buildConfigField 'STRING', 'stringValue', 'devDefaultValue'
| }
| defaultConfigs("release") {
| buildConfigField 'STRING', 'value', 'releaseDefaultValue'
| buildConfigField 'STRING', 'stringValue', 'releaseDefaultValue'
| }
|}
|$buildFileMPPConfig
Expand All @@ -196,7 +196,7 @@ class BuildKonfigPluginFlavorTest {

val commonResult = File(buildDir, "commonMain/com/example/BuildKonfig.kt")
Truth.assertThat(commonResult.readText())
.contains("val value: String = \"releaseDefaultValue\"")
.contains("val stringValue: String = \"releaseDefaultValue\"")

val jvmResult = File(buildDir, "jvmMain/com/example/BuildKonfig.kt")
Truth.assertThat(jvmResult.exists()).isFalse()
Expand All @@ -218,14 +218,14 @@ class BuildKonfigPluginFlavorTest {
| packageName = "com.example"
|
| defaultConfigs {
| buildConfigField 'STRING', 'value', 'defaultValue'
| buildConfigField 'STRING', 'stringValue', 'defaultValue'
| }
| defaultConfigs("dev") {
| buildConfigField 'STRING', 'value', 'devDefaultValue'
| buildConfigField 'STRING', 'stringValue', 'devDefaultValue'
| }
| targetConfigs {
| jvm {
| buildConfigField 'STRING', 'value', 'jvmDefaultValue'
| buildConfigField 'STRING', 'stringValue', 'jvmDefaultValue'
| }
| }
|}
Expand Down Expand Up @@ -273,14 +273,14 @@ class BuildKonfigPluginFlavorTest {
| packageName = "com.example"
|
| defaultConfigs {
| buildConfigField 'STRING', 'value', 'defaultValue'
| buildConfigField 'STRING', 'stringValue', 'defaultValue'
| }
| defaultConfigs("dev") {
| buildConfigField 'STRING', 'value', 'devDefaultValue'
| buildConfigField 'STRING', 'stringValue', 'devDefaultValue'
| }
| targetConfigs("dev") {
| js {
| buildConfigField 'STRING', 'value', 'devJsValue'
| buildConfigField 'STRING', 'stringValue', 'devJsValue'
| }
| }
|}
Expand Down Expand Up @@ -328,7 +328,7 @@ class BuildKonfigPluginFlavorTest {
| packageName = "com.example"
|
| defaultConfigs {
| buildConfigNullableField 'STRING', 'value', 'defaultValue'
| buildConfigNullableField 'STRING', 'stringValue', 'defaultValue'
| buildConfigNullableField 'INT', 'intValue', '10'
| }
|}
Expand All @@ -355,8 +355,7 @@ class BuildKonfigPluginFlavorTest {

val commonResult = File(buildDir, "commonMain/com/example/BuildKonfig.kt")
Truth.assertThat(commonResult.readText()).apply {
contains("String?")
contains("defaultValue")
contains("stringValue: String? = \"defaultValue\"")
contains("intValue: Int? = 10")
}
}
Expand All @@ -371,7 +370,7 @@ class BuildKonfigPluginFlavorTest {
| packageName = "com.example"
|
| defaultConfigs {
| buildConfigNullableField 'STRING', 'value', null
| buildConfigNullableField 'STRING', 'stringValue', null
| buildConfigNullableField 'INT', 'intValue', null
| }
|}
Expand All @@ -398,7 +397,7 @@ class BuildKonfigPluginFlavorTest {

val commonResult = File(buildDir, "commonMain/com/example/BuildKonfig.kt")
Truth.assertThat(commonResult.readText()).apply {
contains("value: String? = null")
contains("stringValue: String? = null")
contains("intValue: Int? = null")
}
}
Expand All @@ -413,16 +412,16 @@ class BuildKonfigPluginFlavorTest {
| packageName = "com.example"
|
| defaultConfigs {
| buildConfigField 'STRING', 'value', 'defaultValue'
| buildConfigField 'STRING', 'key', 'defaultValue'
| }
| targetConfigs {
| js {
| buildConfigField 'STRING', 'value', 'defaultJsValue'
| buildConfigField 'STRING', 'key', 'defaultJsValue'
| }
| }
| targetConfigs("dev") {
| js {
| buildConfigField 'STRING', 'value', 'devJsValue'
| buildConfigField 'STRING', 'key', 'devJsValue'
| }
| }
|}
Expand Down Expand Up @@ -470,16 +469,16 @@ class BuildKonfigPluginFlavorTest {
| packageName = "com.example"
|
| defaultConfigs {
| buildConfigField 'STRING', 'value', 'defaultValue'
| buildConfigField 'STRING', 'stringValue', 'defaultValue'
| }
| targetConfigs {
| js {
| buildConfigField 'STRING', 'value', 'defaultJsValue'
| buildConfigField 'STRING', 'stringValue', 'defaultJsValue'
| }
| }
| targetConfigs("dev") {
| js {
| buildConfigField 'STRING', 'value', 'devJsValue'
| buildConfigField 'STRING', 'stringValue', 'devJsValue'
| }
| }
|}
Expand Down Expand Up @@ -528,7 +527,7 @@ class BuildKonfigPluginFlavorTest {
| objectName = "AwesomeConfig"
|
| defaultConfigs {
| buildConfigField 'STRING', 'value', 'defaultValue'
| buildConfigField 'STRING', 'stringValue', 'defaultValue'
| }
|}
|$buildFileMPPConfig
Expand Down Expand Up @@ -569,11 +568,11 @@ class BuildKonfigPluginFlavorTest {
| objectName = "AwesomeConfig"
|
| defaultConfigs {
| buildConfigField 'STRING', 'value', 'defaultValue'
| buildConfigField 'STRING', 'stringValue', 'defaultValue'
| }
| targetConfigs {
| js {
| buildConfigField 'STRING', 'value', 'jsValue'
| buildConfigField 'STRING', 'stringValue', 'jsValue'
| }
| }
|}
Expand Down Expand Up @@ -627,7 +626,7 @@ class BuildKonfigPluginFlavorTest {
| exposeObjectWithName = "AwesomeConfig"
|
| defaultConfigs {
| buildConfigField 'STRING', 'value', 'defaultValue'
| buildConfigField 'STRING', 'stringValue', 'defaultValue'
| }
|}
|$buildFileMPPConfig
Expand Down Expand Up @@ -670,11 +669,11 @@ class BuildKonfigPluginFlavorTest {
| exposeObjectWithName = "AwesomeConfig"
|
| defaultConfigs {
| buildConfigField 'STRING', 'value', 'defaultValue'
| buildConfigField 'STRING', 'stringValue', 'defaultValue'
| }
| targetConfigs {
| js {
| buildConfigField 'STRING', 'value', 'jsValue'
| buildConfigField 'STRING', 'stringValue', 'jsValue'
| }
| }
|}
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 3 additions & 3 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ buildscript {
repositories {
// Use 'gradle install' to install latest
mavenLocal()
// mavenCentral()
mavenCentral()
}

dependencies {
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.0'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.10'
classpath 'com.codingfeline.buildkonfig:buildkonfig-gradle-plugin:+'
}
}

kotlin {
jvm {}
js {
js(IR) {
browser()
nodejs()
}
Expand Down

0 comments on commit 33c37b6

Please sign in to comment.