diff --git a/.circleci_turned_off/config.yml b/.circleci_turned_off/config.yml
deleted file mode 100644
index 12ca4c0..0000000
--- a/.circleci_turned_off/config.yml
+++ /dev/null
@@ -1,86 +0,0 @@
-version: 2.1
-jobs:
- build:
- 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:
- name: Download Dependencies
- command: ./gradlew androidDependencies
- - save_cache:
- 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:
- path: app/build/reports
- destination: reports
- - 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:
- name: Build Library
- command: ./gradlew :treedatastructure:assembleRelease
- - run:
- name: Export key
- command: |
- mkdir treedatastructure/maven
- echo ${GPG_KEY_CONTENTS} | base64 -d --ignore-garbage > treedatastructure/maven/secret.gpg
- - run:
- name: Staging
- command: ./gradlew :treedatastructure:publishReleasePublicationToSonatypeRepository
- - run:
- name: Release Library
- command: ./gradlew closeAndReleaseRepository
-
-workflows:
- version: 2.1
- build-and-deploy:
- jobs:
- - build:
- filters: # required since `deploy` has tag filters AND requires `build`
- tags:
- only: /.*/
- - deploy:
- requires:
- - build
- filters:
- tags:
- only: /v[0-9]{1,3}\.[0-9]{1,3}\.?[0-9]{0,3}/
- branches:
- ignore: /.*/
\ No newline at end of file
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
deleted file mode 100644
index 660df3d..0000000
--- a/.github/workflows/build.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-name: Build
-
-on: pull_request
-
-jobs:
- build:
- name: Check project build
- runs-on: ubuntu-latest
- steps:
- - name: Check out code
- uses: actions/checkout@v2
- - name: Set up JDK 11
- uses: actions/setup-java@v2
- with:
- distribution: adopt
- java-version: 11
-
- # Builds the release artifacts of the library
- - name: Build
- run: ./gradlew assemble
-
- # Generates other artifacts (javadocJar is optional)
- - name: Source jar and dokka
- run: ./gradlew androidSourcesJar javadocJar
diff --git a/.github/workflows/publish.yml b/.github/workflows/publishRelease.yml
similarity index 65%
rename from .github/workflows/publish.yml
rename to .github/workflows/publishRelease.yml
index 3c5fa22..73c762a 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publishRelease.yml
@@ -7,7 +7,7 @@ on:
jobs:
publish:
- name: Release build and publish
+ name: Publish Production
runs-on: ubuntu-latest
steps:
- name: Check out code
@@ -18,17 +18,9 @@ jobs:
distribution: adopt
java-version: 11
- # Builds the release artifacts of the library
- - name: Release build
- run: ./gradlew :treedatastructure:assembleRelease
-
- # Generates other artifacts (javadocJar is optional)
- - name: Source jar and dokka
- run: ./gradlew androidSourcesJar javadocJar
-
# Runs upload, and then closes & releases the repository
- name: Publish to MavenCentral
- run: ./gradlew publishReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository
+ run: ./gradlew publish --max-workers 1
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
@@ -36,3 +28,4 @@ jobs:
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
+ SNAPSHOT: false
\ No newline at end of file
diff --git a/.github/workflows/publishSnapshot.yml b/.github/workflows/publishSnapshot.yml
new file mode 100644
index 0000000..2b5213a
--- /dev/null
+++ b/.github/workflows/publishSnapshot.yml
@@ -0,0 +1,34 @@
+name: Publish Snapshot
+
+on:
+ workflow_run:
+ workflows: [Test]
+ branches-ignore: [main]
+ types:
+ - completed
+
+jobs:
+ publish:
+ if: ${{ github.event.workflow_run.conclusion == 'success' }}
+ name: Publish Snapshot
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check out code
+ uses: actions/checkout@v2
+ - name: Set up JDK 11
+ uses: actions/setup-java@v2
+ with:
+ distribution: adopt
+ java-version: 11
+
+ # Runs upload, and then closes & releases the repository
+ - name: Publish to snapshot to Sonatype
+ run: ./gradlew publish --max-workers 1
+ env:
+ OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
+ OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
+ SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
+ SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
+ SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
+ SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
+ SNAPSHOT: false
\ No newline at end of file
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 48d4f91..8776712 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -1,9 +1,6 @@
name: Test
-on:
- pull_request:
- branches:
- - master
+on: [push]
jobs:
build:
@@ -20,4 +17,4 @@ jobs:
# Builds the release artifacts of the library
- name: Test
- run: ./gradlew test
+ run: ./gradlew test
\ No newline at end of file
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..a39e569
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,4 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+artifacts
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
index 43fd926..1bec35e 100644
--- a/.idea/codeStyles/Project.xml
+++ b/.idea/codeStyles/Project.xml
@@ -3,121 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- xmlns:android
-
- ^$
-
-
-
-
-
-
-
-
- xmlns:.*
-
- ^$
-
-
- BY_NAME
-
-
-
-
-
-
- .*:id
-
- http://schemas.android.com/apk/res/android
-
-
-
-
-
-
-
-
- .*:name
-
- http://schemas.android.com/apk/res/android
-
-
-
-
-
-
-
-
- name
-
- ^$
-
-
-
-
-
-
-
-
- style
-
- ^$
-
-
-
-
-
-
-
-
- .*
-
- ^$
-
-
- BY_NAME
-
-
-
-
-
-
- .*
-
- http://schemas.android.com/apk/res/android
-
-
- ANDROID_ATTRIBUTE_ORDER
-
-
-
-
-
-
- .*
-
- .*
-
-
- BY_NAME
-
-
-
-
-
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 46b6df2..5404067 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -4,15 +4,11 @@