Skip to content

Commit

Permalink
Merge pull request #223 from qonversion/release/3.1.2
Browse files Browse the repository at this point in the history
Release/3.1.2
  • Loading branch information
Maria-Bordunova authored Sep 13, 2021
2 parents 69dada2 + 8634947 commit 262195f
Show file tree
Hide file tree
Showing 117 changed files with 1,677 additions and 285 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/tests.yml → .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,30 @@ jobs:

steps:
- uses: actions/checkout@v2

- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Make gradlew executable
run: chmod +x ./gradlew

- name: Detekt
run: ./gradlew detektAll

- name: Set up Ruby 2.6
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6.0

- name: Install dependencies
run: bundle install
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Fastlane Action
uses: maierj/[email protected]
with:
lane: test
- name: Build and Tests
run: |
fastlane test
fastlane test
29 changes: 29 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish

on:
release:
types: [released]

jobs:
publish:
name: Upload archives
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2

- name: Prepare Sonatype Gradle properties
run: |
mkdir -p ~/.gradle
echo "${{ secrets.SONATYPE_GPG_FILE }}" > key.gpg.asc
gpg -d --passphrase "${{ secrets.SONATYPE_GPG_PASSPHRASE }}" --batch "key.gpg.asc" > "$HOME/.gradle/key.gpg"
echo "signing.keyId=${{ secrets.SONATYPE_GPG_ID }}" >> ~/.gradle/gradle.properties
echo "signing.password=${{ secrets.SONATYPE_GPG_PASSWORD }}" >> ~/.gradle/gradle.properties
echo "signing.secretKeyRingFile=$HOME/.gradle/key.gpg" >> ~/.gradle/gradle.properties
echo "sonatypeStagingProfileId=${{ secrets.SONATYPE_STAGING_PROFILE_ID }}" >> ~/.gradle/gradle.properties
- name: Publish to MavenCentral
run: ./gradlew publishToSonatype closeSonatypeStagingRepository
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
56 changes: 54 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
buildscript {
ext {
release = [
versionName: "3.1.1",
versionName: "3.1.2",
versionCode: 1
]
}
ext.kotlin_version = '1.3.61'
repositories {
mavenCentral()
google()
maven { url 'https://jitpack.io' }
jcenter()
Expand All @@ -21,16 +22,67 @@ buildscript {
}
}

plugins {
id "io.gitlab.arturbosch.detekt" version "1.18.0"
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
}

dependencies {
detektPlugins "io.gitlab.arturbosch.detekt:detekt-formatting:1.18.0"
}

allprojects {
repositories {
mavenCentral()
google()
maven { url 'https://jitpack.io' }
jcenter()

}
}

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

def projectSource = file(projectDir)
def configFile = files("$rootDir/config/detekt/detekt.yml")
def baselineFile = file("$rootDir/config/detekt/baseline.xml")
def kotlinFiles = "**/*.kt"
def resourceFiles = "**/resources/**"
def buildFiles = "**/build/**"
def testFiles = "**/test/**"
def appFiles = "**/app/**"

tasks.register("detektAll", io.gitlab.arturbosch.detekt.Detekt) {
description = "Detekt build for all modules"
parallel = true
ignoreFailures = false
autoCorrect = true
buildUponDefaultConfig = true
setSource(projectSource)
baseline.set(baselineFile)
config.setFrom(configFile)
include(kotlinFiles)
exclude(buildFiles)
exclude(testFiles)
exclude(appFiles)
reports {
html.enabled = true
xml.enabled = false
txt.enabled = false
}
}

tasks.register("detektGenerateBaseline", io.gitlab.arturbosch.detekt.DetektCreateBaselineTask) {
description = "Build baseline for all modules\""
parallel = true
ignoreFailures = true
buildUponDefaultConfig = true
setSource(projectSource)
baseline.set(baselineFile)
config.setFrom(configFile)
include(kotlinFiles)
exclude(resourceFiles, buildFiles)
}

apply from: "${rootDir}/scripts/publish-root.gradle"
417 changes: 417 additions & 0 deletions config/detekt/baseline.xml

Large diffs are not rendered by default.

Loading

0 comments on commit 262195f

Please sign in to comment.