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:
|
jobs:
|
||||||
build:
|
build:
|
||||||
working_directory: ~/code
|
working_directory: ~/code
|
||||||
branches:
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
docker:
|
docker:
|
||||||
- image: circleci/android:api-29
|
- image: circleci/android:api-29
|
||||||
environment:
|
environment:
|
||||||
@ -13,9 +10,6 @@ jobs:
|
|||||||
- checkout
|
- checkout
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
|
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:
|
- run:
|
||||||
name: Download Dependencies
|
name: Download Dependencies
|
||||||
command: ./gradlew androidDependencies
|
command: ./gradlew androidDependencies
|
||||||
@ -23,11 +17,61 @@ jobs:
|
|||||||
paths:
|
paths:
|
||||||
- ~/.gradle
|
- ~/.gradle
|
||||||
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.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:
|
- run:
|
||||||
name: Run Tests
|
name: Run Tests
|
||||||
command: ./gradlew lint test
|
command: ./gradlew lint test
|
||||||
- store_artifacts: # for display in Artifacts: https://circleci.com/docs/2.0/artifacts/
|
- store_artifacts:
|
||||||
path: app/build/reports
|
path: app/build/reports
|
||||||
destination: reports
|
destination: reports
|
||||||
- store_test_results: # for display in Test Summary: https://circleci.com/docs/2.0/collect-test-data/
|
- store_test_results:
|
||||||
path: app/build/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>
|
<JetCodeStyleSettings>
|
||||||
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
|
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
|
||||||
</JetCodeStyleSettings>
|
</JetCodeStyleSettings>
|
||||||
|
<MarkdownNavigatorCodeStyleSettings>
|
||||||
|
<option name="RIGHT_MARGIN" value="72" />
|
||||||
|
</MarkdownNavigatorCodeStyleSettings>
|
||||||
<codeStyleSettings language="XML">
|
<codeStyleSettings language="XML">
|
||||||
<indentOptions>
|
<indentOptions>
|
||||||
<option name="CONTINUATION_INDENT_SIZE" value="4" />
|
<option name="CONTINUATION_INDENT_SIZE" value="4" />
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# Tree (Data Structure)
|
# Tree (Data Structure)
|
||||||
[](https://mvnrepository.com/artifact/com.github.adriankuta/tree-structure)
|
[](https://mvnrepository.com/artifact/com.github.adriankuta/tree-structure)
|
||||||
[](https://github.com/AdrianKuta/Design-Patterns-Kotlin/blob/master/LICENSE)
|
[](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.
|
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 {
|
maven {
|
||||||
// This is an arbitrary name, you may also use "mavencentral" or
|
// This is an arbitrary name, you may also use "mavencentral" or
|
||||||
// any other name that's descriptive for you
|
// any other name that's descriptive for you
|
||||||
name = "mavencentral"
|
name = "sonatype"
|
||||||
|
|
||||||
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
|
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
|
||||||
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
|
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
|
||||||
|
@ -40,10 +40,6 @@ class TreeNode<T>(val value: T) {
|
|||||||
return childrenMaxDepth + 1
|
return childrenMaxDepth + 1
|
||||||
}
|
}
|
||||||
|
|
||||||
fun allItems(): List<T> {
|
|
||||||
return children.map { value }
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun toString(): String {
|
override fun toString(): String {
|
||||||
val stringBuilder = StringBuilder()
|
val stringBuilder = StringBuilder()
|
||||||
print(stringBuilder, "", "")
|
print(stringBuilder, "", "")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user