-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update gradle v6.0.1 -> v6.6.1 * update kotlin v1.3.61 -> v1.4.21 * prepare buildSrc and gradle.properties to go multiplatform * update gradle v6.6.1 -> v6.7.1 * converted to multiplatform with jvm and nodeJS targets * configure 'com.github.ben-manes.versions' gradle plugin * enabled strict 'explicitApi' mode for all modules * use Kotlin DSL extension of 'tasks.named(...)' to avoid IDE errors * increase mocha tests timeout to 10s * add js browser target * set jvm test target to 1.8 (default is 1.6) * update kotlin v1.4.21 -> v.1.4.30 * remove js browser target and avoid setting jvmTarget for now * remove *.gradle files from older multiplatform implementation * update gradle v6.7.1 -> v6.8.1 * set jvm target to 1.8 (default is 1.6) * added GitHub actions based ci * config dependencyResolutionManagement in settings.gradle.kts * define logging for all test tasks * create root aggregate test report for all sub-modules * amend github action workflows * fix jacoco config * remove unnecessary repo * set GitHub credentials for deployment in workflow * added 'maven-publish' plugin and config for GitHub Packages * if build fails - bundle and upload build reports * add a failing test to check ci build failure report * remove failing test - now ci should pass * added upload failed build reports to ci * ci workflow - publish 'master-SNAPSHOT' versions to GitHub Packages * fix GitHub Packages maven repo name that affects expected property names for credentials * update README.md for multiplatform support * make suer maven 'groupId' of published modules is in lowercase * add CI badge to README.md * add a github release workflow * Update release.yml * Update mpp-module.gradle.kts * pass 'version' property to gradle when publishing * pass 'version' system property to gradle when publishing * fix names of workflows * update gradle v6.8.1 -> v6.8.2 * update README.md
- Loading branch information
Or Noyman
authored
Feb 21, 2021
1 parent
a325530
commit a29443c
Showing
34 changed files
with
465 additions
and
579 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Continuous Integration | ||
|
||
env: | ||
GRADLE_OPTS: '-Dorg.gradle.daemon=false -Dorg.gradle.configureondemand=false -Dorg.gradle.vfs.watch=false -Dkotlin.compiler.execution.strategy=in-process' | ||
JAVA_VERSION: 11 | ||
ORG_GRADLE_PROJECT_githubUsername: ${{ github.actor }} | ||
ORG_GRADLE_PROJECT_githubPassword: ${{ github.token }} | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths-ignore: | ||
- '*.md' | ||
- 'LICENSE' | ||
- '.gitignore' | ||
|
||
jobs: | ||
build: | ||
timeout-minutes: 15 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Validate Gradle Wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
|
||
- name: Setup JDK ${{ env.JAVA_VERSION }} | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: ${{ env.JAVA_VERSION }} | ||
|
||
- name: Cache gradle | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
~/.konan | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|
||
- name: Build project and run tests with Gradle | ||
run: ./gradlew clean build --info | ||
|
||
- name: Bundle the failed build report | ||
if: failure() | ||
run: find ./build -type d -name 'reports' | zip -@ -r build-reports.zip | ||
|
||
- name: Upload the failed build report | ||
if: failure() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: error-report | ||
path: build-reports.zip | ||
retention-days: 7 | ||
|
||
- name: Publish library with Gradle | ||
run: ./gradlew publish -Dversion=master-SNAPSHOT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Pull Request Check | ||
|
||
env: | ||
GRADLE_OPTS: '-Dorg.gradle.daemon=false -Dorg.gradle.configureondemand=false -Dorg.gradle.vfs.watch=false -Dkotlin.compiler.execution.strategy=in-process' | ||
JAVA_VERSION: 11 | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
paths-ignore: | ||
- '*.md' | ||
- 'LICENSE' | ||
- '.gitignore' | ||
|
||
jobs: | ||
build: | ||
timeout-minutes: 15 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Validate Gradle Wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
|
||
- name: Setup JDK ${{ env.JAVA_VERSION }} | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: ${{ env.JAVA_VERSION }} | ||
|
||
- name: Cache gradle | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
~/.konan | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|
||
- name: Build project and run tests | ||
run: ./gradlew clean build --info | ||
|
||
- name: Bundle the failed build report | ||
if: failure() | ||
run: find ./build -type d -name 'reports' | zip -@ -r build-reports.zip | ||
|
||
- name: Upload the failed build report | ||
if: failure() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: error-report | ||
path: build-reports.zip | ||
retention-days: 7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Release | ||
|
||
env: | ||
GRADLE_OPTS: '-Dorg.gradle.daemon=false -Dorg.gradle.configureondemand=false -Dorg.gradle.vfs.watch=false -Dkotlin.compiler.execution.strategy=in-process' | ||
JAVA_VERSION: 11 | ||
ORG_GRADLE_PROJECT_githubUsername: ${{ github.actor }} | ||
ORG_GRADLE_PROJECT_githubPassword: ${{ github.token }} | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
timeout-minutes: 15 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Validate Gradle Wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
|
||
- name: Setup JDK ${{ env.JAVA_VERSION }} | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: ${{ env.JAVA_VERSION }} | ||
|
||
- name: Cache gradle | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
~/.konan | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|
||
- name: Build project and run tests with Gradle | ||
run: ./gradlew clean build --info | ||
|
||
- name: Bundle the failed build report | ||
if: failure() | ||
run: find ./build -type d -name 'reports' | zip -@ -r build-reports.zip | ||
|
||
- name: Upload the failed build report | ||
if: failure() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: error-report | ||
path: build-reports.zip | ||
retention-days: 7 | ||
|
||
- name: Publish library with Gradle | ||
run: | | ||
NEW_VERSION=$(echo "${GITHUB_REF}" | cut -d "/" -f3) | ||
./gradlew publish -Dversion=${NEW_VERSION} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,20 @@ | ||
apply { | ||
from("https://raw.githubusercontent.com/ligi/gradle-common/master/versions_plugin_stable_only.gradle") | ||
plugins { | ||
base | ||
} | ||
|
||
buildscript { | ||
repositories { | ||
jcenter() | ||
} | ||
|
||
dependencies { | ||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlin}") | ||
classpath("com.github.ben-manes:gradle-versions-plugin:${Versions.versionsPlugin}") | ||
} | ||
|
||
val testAggregateReport = tasks.register<TestReport>("testAggregateReport") { | ||
group = "Reporting" | ||
description = "Collect aggregate test reports of all sub-modules." | ||
destinationDir = file("$buildDir/reports/tests") | ||
reportOn(subprojects.map { | ||
it.tasks.withType<AbstractTestTask>() | ||
}) | ||
} | ||
|
||
allprojects { | ||
|
||
repositories { | ||
jcenter() | ||
maven("https://jitpack.io") | ||
} | ||
|
||
} | ||
|
||
|
||
subprojects { | ||
repositories { | ||
jcenter() | ||
maven("https://jitpack.io") | ||
maven("https://kotlin.bintray.com/kotlinx") | ||
} | ||
|
||
apply(plugin = "jacoco") | ||
apply(plugin = "maven") | ||
apply(plugin = "kotlin") | ||
|
||
tasks.withType<Test> { | ||
useJUnitPlatform() | ||
} | ||
|
||
configure<JavaPluginExtension> { | ||
withSourcesJar() | ||
withJavadocJar() | ||
} | ||
|
||
afterEvaluate { | ||
|
||
dependencies { | ||
"implementation"("org.jetbrains.kotlin:kotlin-stdlib:${Versions.kotlin}") | ||
|
||
"testImplementation"("org.assertj:assertj-core:3.14.0") | ||
"testImplementation"("org.junit.jupiter:junit-jupiter-api:${Versions.jupiter}") | ||
"testRuntime"("org.junit.jupiter:junit-jupiter-engine:${Versions.jupiter}") | ||
|
||
"testImplementation"("org.jetbrains.kotlin:kotlin-test") | ||
tasks.withType<AbstractTestTask> { | ||
finalizedBy(testAggregateReport) | ||
} | ||
|
||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../gradle.properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
object Versions { | ||
const val kotlin = "1.3.61" | ||
const val versionsPlugin = "0.27.0" | ||
const val jupiter = "5.5.2" | ||
const val jacocoPlugin = "0.8.5" | ||
const val assertk = "0.23" | ||
} |
Oops, something went wrong.