Skip to content

Commit

Permalink
Merge pull request #1 from tangem/feature/AND-7226-changes-for-market…
Browse files Browse the repository at this point in the history
…s-chart

AND-7226 Changes for markets chart
  • Loading branch information
MasterBin authored Jun 3, 2024
2 parents ac44341 + 3fe6379 commit 1a7907f
Show file tree
Hide file tree
Showing 62 changed files with 2,077 additions and 202 deletions.
16 changes: 0 additions & 16 deletions .github/DISCUSSION_TEMPLATE/questions.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/ISSUE_TEMPLATE/bug.yml

This file was deleted.

5 changes: 0 additions & 5 deletions .github/ISSUE_TEMPLATE/config.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .github/ISSUE_TEMPLATE/documentation-error.yml

This file was deleted.

5 changes: 4 additions & 1 deletion .github/workflows/build-debug-apk.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: Build debug APK
on:
push:
pull_request:
jobs:
build-debug-apk:
Expand All @@ -17,3 +16,7 @@ jobs:
with:
name: Debug APK
path: sample/build/outputs/apk/debug/**.apk
- uses: actions/upload-artifact@v4
with:
name: Debug Tangem Demo APK
path: tangem-demo/build/outputs/apk/debug/**.apk
16 changes: 0 additions & 16 deletions .github/workflows/check-formatting.yml

This file was deleted.

66 changes: 66 additions & 0 deletions .github/workflows/neutral-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Neutral Build

on:
push:
branches:
- 'tangem-master'
workflow_dispatch:

env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_DVELOPMENT_ANDROID }}

jobs:
tag:
name: Create tag
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: vico

- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: zulu

- uses: gradle/gradle-build-action@v3
- run: |
VERSION_NAME=$(grep -oP "(?<=version_name).*(?=\",)" versions.gradle | grep -oP "(?<=\").*")
echo "VERSION_NAME=$VERSION_NAME" >> $GITHUB_ENV
echo "TAG_NAME=v$VERSION_NAME" >> $GITHUB_ENV
./gradlew assembleDebug
- name: Create tag
uses: actions/github-script@v3
with:
github-token: ${{ github.token }}
script: |
github.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: "refs/tags/${{ env.VERSION_NAME }}",
sha: context.sha
})
- name: Build and publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
run: |
echo sdk.dir = $ANDROID_HOME > local.properties
./gradlew -PgithubUser=${{ secrets.GITHUB_ACTOR }} -PgithubPass=${{ secrets.GITHUB_TOKEN }} -PartifactVersion=${{ env.VERSION_NAME }} publish
- name: Build notification
if: always()
uses: adamkdean/simple-slack-notify@master
with:
channel: '#development-android'
status: ${{ job.status }}
success_text: 'Tangem Vico library build (${{ env.VERSION_NAME }}) has been created and uploaded to Nexus.'
failure_text: 'GitHub Action #${{ github.run_number }} failed. Tag has not been not created.'
cancelled_text: 'GitHub Action #${{ github.run_number }} was cancelled'
fields: |
[{"title": "TAG", "value": "${{ env.VERSION_NAME }}"},
{"title": "Action URL", "value": "${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}"}]
56 changes: 0 additions & 56 deletions .github/workflows/release-update.yml

This file was deleted.

9 changes: 0 additions & 9 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: Run tests
on:
push:
pull_request:
jobs:
run-tests:
Expand All @@ -16,11 +15,3 @@ jobs:
- run: chmod +x gradlew
- id: unit-tests
run: ./gradlew vico:core:testDebug
- id: paparazzi
if: ${{ success() || steps.unit-tests.conclusion == 'failure' }}
run: ./gradlew sample:verifyPaparazziDebug
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() && steps.paparazzi.conclusion == 'failure' }}
with:
name: Paparazzi deltas
path: sample/build/paparazzi/failures/delta-*.png
2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 8 additions & 33 deletions common-scripts.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ String getArtifactId(Project project) {

void customizePom(MavenPom pom) {

pom.name = "Vico"
pom.name = "Tangem Vico"
pom.description = "A light and extensible chart library for Android."
pom.url = "https://github.com/patrykandpatrick/vico"
pom.url = "https://github.com/tangem/vico"

pom.licenses {

Expand All @@ -77,25 +77,10 @@ void customizePom(MavenPom pom) {
}

pom.scm {
connection = "scm:git:git://github.com/patrykandpatrick/vico.git"
developerConnection = "scm:git:ssh://github.com/patrykandpatrick/vico.git"
connection = "scm:git:git://github.com/tangem/vico.git"
developerConnection = "scm:git:ssh://github.com/tangem/vico.git"
url = "https://github.com/patrykandpatrick/vico"
}

pom.developers {

developer {
id = "patrykgoworowski"
name = "Patryk Goworowski"
email = "contact@patrykgoworowski.pl"
}

developer {
id = "patrickmichalik"
name = "Patrick Michalik"
email = "contact@patrickmichalik.com"
}
}
}

boolean isReleaseVersion() {
Expand All @@ -104,25 +89,15 @@ boolean isReleaseVersion() {

void setUpRepositories(RepositoryHandler handler) {
handler.maven {
def releaseUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = isReleaseVersion() ? releaseUrl : snapshotUrl

name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/tangem/vico")
credentials {
username = "patrykandpatrick"
password = findProperty("OSSRH_PASSWORD")
username = "$githubUser"
password = "$githubPass"
}
}
}

void setUpSigning(SigningExtension signing, MavenPublication publication) {
signing.setRequired {
isReleaseVersion() && gradle.taskGraph.allTasks.any { it.is(PublishToMavenRepository) }
}

def gpgKey = findProperty("GPG_KEY")
def gpgKeyPassword = findProperty("GPG_KEY_PASSWORD")

signing.useInMemoryPgpKeys(gpgKey, gpgKeyPassword)
signing.sign publication
}
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ android.useAndroidX=true
kotlin.code.style=official
# https://blog.jetbrains.com/kotlin/2022/07/a-new-approach-to-incremental-compilation-in-kotlin/
kotlin.incremental.useClasspathSnapshot=true

githubUser=github_user
githubPass=github_pass
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ appcompat = "1.7.0"
composeBom = "2024.05.00"
composeNavigation = "2.7.7"
coroutines = "1.8.1"
desugar_jdk_libs = "2.0.4"
dokka = "1.9.20"
jUnit = "4.13.2"
jUnitExt = "1.1.5"
Expand Down Expand Up @@ -35,6 +36,7 @@ composeUI = { group = "androidx.compose.ui", name = "ui" }
composeUITooling = { group = "androidx.compose.ui", name = "ui-tooling" }
composeViewBinding = { group = "androidx.compose.ui", name = "ui-viewbinding" }
coroutinesCore = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "coroutines" }
desugarJdkLibs = { module = "com.android.tools:desugar_jdk_libs", version.ref = "desugar_jdk_libs" }
jUnit = { module = "junit:junit", version.ref = "jUnit" }
jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "jupiter" }
jupiterParams = { module = "org.junit.jupiter:junit-jupiter-params", version.ref = "jupiter" }
Expand Down
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ dependencyResolutionManagement {
rootProject.name = "Vico"

include(
"tangem-demo",
"sample",
"vico",
"vico:compose",
Expand Down
Loading

0 comments on commit 1a7907f

Please sign in to comment.