Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version updates #74

Merged
merged 14 commits into from
May 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,15 @@ jobs:
key: ${{ runner.os }}-gradle-konan
restore-keys: |
${{ runner.os }}-gradle-konan
- name: Gradle build with remote cache
uses: burrunan/gradle-cache-action@v1
- uses: burrunan/gradle-cache-action@v1
with:
arguments: |
build
# FixMe: https://github.com/cqfn/save/issues/67
# -x detekt
properties: |
org.gradle.caching=true
gradle-version: wrapper
# additional files to calculate key for dependency cache
gradle-dependencies-cache-key: |
buildSrc/**/Versions.kt
# Until https://github.com/burrunan/gradle-cache-action/issues/42 is addressed, gradle should be run as a separate step
- name: Run gradle command
run: ./gradlew build --build-cache
- name: Upload gradle reports
if: ${{ always() }}
uses: actions/upload-artifact@v2
Expand Down
17 changes: 7 additions & 10 deletions .github/workflows/detekt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,11 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: 1.11
# FixMe: https://github.com/cqfn/save/issues/67
#- name: Gradle build with remote cache
# uses: burrunan/gradle-cache-action@v1
# with:
# arguments: detektAll
# properties: |
# org.gradle.caching=true
# gradle-version: wrapper
- uses: burrunan/gradle-cache-action@v1
with:
gradle-version: wrapper
# additional files to calculate key for dependency cache
# gradle-dependencies-cache-key: |
# buildSrc/**/Versions.kt
gradle-dependencies-cache-key: |
buildSrc/**/Versions.kt
- name: Run gradle command
run: ./gradlew detektAll --build-cache
9 changes: 4 additions & 5 deletions .github/workflows/diktat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: 1.11
- name: Gradle build with remote cache
uses: burrunan/gradle-cache-action@v1
- uses: burrunan/gradle-cache-action@v1
with:
arguments: diktatCheckAll
properties: |
org.gradle.caching=true
gradle-version: wrapper
# additional files to calculate key for dependency cache
gradle-dependencies-cache-key: |
buildSrc/**/Versions.kt
# Until https://github.com/burrunan/gradle-cache-action/issues/42 is addressed, gradle should be run as a separate step
- name: Run gradle command
run: ./gradlew diktatCheckAll --build-cache
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ] #, macos-latest ]
os: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- name: Checkout
uses: actions/checkout@v2.3.3
Expand All @@ -27,10 +27,11 @@ jobs:
- name: Status git beforeafter
run: git status
- uses: burrunan/gradle-cache-action@v1
name: Gradle release with caches caching
with:
arguments: linkReleaseExecutableMultiplatform publishToSonatype closeSonatypeStagingRepository
gradle-version: wrapper
# Until https://github.com/burrunan/gradle-cache-action/issues/42 is addressed, gradle should be run as a separate step
- name: Run gradle command
run: ./gradlew --build-cache linkReleaseExecutableMultiplatform publishToSonatype closeSonatypeStagingRepository
- name: Upload artifact
id: upload_artifact
uses: actions/upload-artifact@v2
Expand Down
6 changes: 2 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ allprojects {
maven(url = "https://kotlin.bintray.com/kotlinx/")
}
configureDiktat()
// FixMe: https://github.com/cqfn/save/issues/67
//configureDetekt()
configureDetekt()
}
createDiktatTask()
// FixMe: https://github.com/cqfn/save/issues/67
//createDetektTask()
createDetektTask()
installGitHooks()

configurePublishing()
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ repositories {
}

dependencies {
implementation("org.cqfn.diktat:diktat-gradle-plugin:0.5.1")
implementation("org.cqfn.diktat:diktat-gradle-plugin:0.5.3")
implementation("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.16.0")
runtimeOnly(kotlin("gradle-plugin", "1.4.32"))
runtimeOnly(kotlin("gradle-plugin", "1.5.0"))
implementation("io.github.gradle-nexus:publish-plugin:1.1.0")
implementation("org.ajoberstar.reckon:reckon-gradle:0.13.0")
implementation("com.squareup:kotlinpoet:1.8.0")
Expand Down
6 changes: 3 additions & 3 deletions buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
@file:Suppress("PACKAGE_NAME_MISSING", "CONSTANT_UPPERCASE")

object Versions {
const val kotlin = "1.4.32"
const val junit = "5.7.1"
const val kotlin = "1.5.0"
const val junit = "5.7.2"
const val okio = "3.0.0-alpha.1"
const val ktoml = "0.2.4"

object Kotlinx {
const val serialization = "1.1.0"
const val datetime = "0.1.1"
const val datetime = "0.2.0"
const val cli = "0.3.2"
}
}
8 changes: 6 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
group=org.cqfn.save
kotlin.code.style=official
kotlin.mpp.stability.nowarn=true

# gradle performance
org.gradle.parallel=true
org.gradle.vfs.watch=true
org.gradle.jvmargs=-Xmx1g -XX:MaxMetaspaceSize=512m

# Kotlin
kotlin.code.style=official
kotlin.mpp.stability.nowarn=true
kotlin.native.cacheKind.linuxX64=static
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This file contains platform-dependent utils
*/

@file:Suppress("FILE_NAME_MATCH_CLASS")
@file:Suppress("FILE_NAME_MATCH_CLASS", "MatchingDeclarationName")

package org.cqfn.save.core.utils

Expand Down
2 changes: 1 addition & 1 deletion save-plugins/fix-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ kotlin {
val commonMain by getting {
dependencies {
implementation(project(":save-common"))
implementation("io.github.petertrr:kotlin-multiplatform-diff:0.1.0")
implementation("io.github.petertrr:kotlin-multiplatform-diff:0.2.0")
}
}
val commonTest by getting {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class FixPluginTest {
write("Expected file".encodeToByteArray())
}

val diskWithTmpDir = if (isCurrentOsWindows()) "${tmpDir.toString().substringBefore("\\").toLowerCase()} && " else ""
val diskWithTmpDir = if (isCurrentOsWindows()) "${tmpDir.toString().substringBefore("\\").lowercase()} && " else ""
val executionCmd = "${diskWithTmpDir}cd $tmpDir && echo Expected file > Test3Test.java"

val results = FixPlugin().execute(
Expand Down Expand Up @@ -104,7 +104,7 @@ class FixPluginTest {
fs.write(expectedFile) {
write("Expected file".encodeToByteArray())
}
val diskWithTmpDir = if (isCurrentOsWindows()) "${tmpDir.toString().substringBefore("\\").toLowerCase()} && " else ""
val diskWithTmpDir = if (isCurrentOsWindows()) "${tmpDir.toString().substringBefore("\\").lowercase()} && " else ""
val executionCmd = "${diskWithTmpDir}cd $tmpDir && echo Expected file > Test3Test_copy.java"

val results = FixPlugin().execute(
Expand Down