mirror of
https://github.com/AdrianKuta/Tree-Data-Structure.git
synced 2025-04-19 23:19:03 +02:00
Updated CI (#2)
* Updated CI * Updated CI * Updated CI * Updated CI * Removed wrong method.
This commit is contained in:
parent
6a1c33fd02
commit
ff6c6ba6e1
@ -1,10 +1,7 @@
|
||||
version: 2
|
||||
version: 2.1
|
||||
jobs:
|
||||
build:
|
||||
working_directory: ~/code
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
docker:
|
||||
- image: circleci/android:api-29
|
||||
environment:
|
||||
@ -13,9 +10,6 @@ jobs:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
|
||||
# - run:
|
||||
# name: Chmod permissions #if permission for Gradlew Dependencies fail, use this.
|
||||
# command: sudo chmod +x ./gradlew
|
||||
- run:
|
||||
name: Download Dependencies
|
||||
command: ./gradlew androidDependencies
|
||||
@ -23,11 +17,61 @@ jobs:
|
||||
paths:
|
||||
- ~/.gradle
|
||||
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
|
||||
|
||||
tests:
|
||||
working_directory: ~/code
|
||||
docker:
|
||||
- image: circleci/android:api-29
|
||||
environment:
|
||||
JVM_OPTS: -Xmx3200m
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
|
||||
- store_artifacts:
|
||||
path: app/build/reports
|
||||
destination: reports
|
||||
- run:
|
||||
name: Run Lint Test
|
||||
command: ./gradlew lint
|
||||
- run:
|
||||
name: Run Tests
|
||||
command: ./gradlew lint test
|
||||
- store_artifacts: # for display in Artifacts: https://circleci.com/docs/2.0/artifacts/
|
||||
- store_artifacts:
|
||||
path: app/build/reports
|
||||
destination: reports
|
||||
- store_test_results: # for display in Test Summary: https://circleci.com/docs/2.0/collect-test-data/
|
||||
path: app/build/test-results
|
||||
- store_test_results:
|
||||
path: app/build/test-results
|
||||
|
||||
deploy:
|
||||
working_directory: ~/code
|
||||
docker:
|
||||
- image: circleci/android:api-29
|
||||
environment:
|
||||
JVM_OPTS: -Xmx3200m
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
|
||||
- run:
|
||||
command: echo $GPG_KEY_CONTENTS | base64 -d > /secret.gpg
|
||||
- run:
|
||||
name: Staging
|
||||
command: ./gradlew treedatastructure:publishReleasePublicationToSonatypeRepository
|
||||
|
||||
workflows:
|
||||
version: 2.1
|
||||
build-and-deploy:
|
||||
jobs:
|
||||
- build
|
||||
- deploy:
|
||||
requires:
|
||||
- build
|
||||
filters:
|
||||
tags:
|
||||
only:
|
||||
- /.*/
|
||||
branches:
|
||||
only:
|
||||
- release
|
||||
- master
|
3
.idea/codeStyles/Project.xml
generated
3
.idea/codeStyles/Project.xml
generated
@ -3,6 +3,9 @@
|
||||
<JetCodeStyleSettings>
|
||||
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
|
||||
</JetCodeStyleSettings>
|
||||
<MarkdownNavigatorCodeStyleSettings>
|
||||
<option name="RIGHT_MARGIN" value="72" />
|
||||
</MarkdownNavigatorCodeStyleSettings>
|
||||
<codeStyleSettings language="XML">
|
||||
<indentOptions>
|
||||
<option name="CONTINUATION_INDENT_SIZE" value="4" />
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Tree (Data Structure)
|
||||
[](https://mvnrepository.com/artifact/com.github.adriankuta/tree-structure)
|
||||
[](https://github.com/AdrianKuta/Design-Patterns-Kotlin/blob/master/LICENSE)
|
||||
[](https://circleci.com/gh/AdrianKuta/Tree-Data-Structure)
|
||||
[](https://circleci.com/gh/AdrianKuta/Tree-Data-Structure)
|
||||
|
||||
Simple implementation to store object in tree structure. Method `toString()` is overrided to provide nice tree view in logs.
|
||||
|
||||
|
@ -100,7 +100,7 @@ publishing {
|
||||
maven {
|
||||
// This is an arbitrary name, you may also use "mavencentral" or
|
||||
// any other name that's descriptive for you
|
||||
name = "mavencentral"
|
||||
name = "sonatype"
|
||||
|
||||
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
|
||||
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
|
||||
|
@ -40,10 +40,6 @@ class TreeNode<T>(val value: T) {
|
||||
return childrenMaxDepth + 1
|
||||
}
|
||||
|
||||
fun allItems(): List<T> {
|
||||
return children.map { value }
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
val stringBuilder = StringBuilder()
|
||||
print(stringBuilder, "", "")
|
||||
|
Loading…
x
Reference in New Issue
Block a user