Skip to content

Commit

Permalink
add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
shpasha committed Nov 7, 2024
1 parent e39b5c9 commit e29c3de
Show file tree
Hide file tree
Showing 11 changed files with 53 additions and 177 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Publish to mavencentral

on:
push:
tags:
- '*'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 21
uses: actions/setup-java@v2
with:
java-version: '21'
distribution: 'temurin'
- name: Build and publish with Gradle
uses: gradle/gradle-build-action@3
with:
arguments: --no-daemon -i jreleaserConfig build test publish
env:
JRELEASER_GPG_SECRET_KEY: ${{ secrets.JRELEASER_GPG_SECRET_KEY }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.JRELEASER_GPG_PASSPHRASE }}
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JRELEASER_MAVENCENTRAL_USERNAME: ${{ secrets.JRELEASER_MAVENCENTRAL_SONATYPE_USERNAME }}
JRELEASER_MAVENCENTRAL_TOKEN: ${{ secrets.JRELEASER_MAVENCENTRAL_SONATYPE_TOKEN }}
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.JRELEASER_GPG_PUBLIC_KEY }}

- name: Release with gradle
uses: gradle/gradle-build-action@3
with:
arguments: --no-daemon -i jreleaserFullRelease
env:
JRELEASER_GPG_SECRET_KEY: ${{ secrets.JRELEASER_GPG_SECRET_KEY }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.JRELEASER_GPG_PASSPHRASE }}
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JRELEASER_MAVENCENTRAL_USERNAME: ${{ secrets.JRELEASER_MAVENCENTRAL_SONATYPE_USERNAME }}
JRELEASER_MAVENCENTRAL_TOKEN: ${{ secrets.JRELEASER_MAVENCENTRAL_SONATYPE_TOKEN }}
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.JRELEASER_GPG_PUBLIC_KEY }}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=0.0.2
version=0.0.3
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
android.useAndroidX=true
kotlin.code.style=official
Expand Down
1 change: 0 additions & 1 deletion pagerindicator/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import org.jreleaser.model.Active
import java.nio.file.Files

plugins {
alias(libs.plugins.android.library)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import mx.platacard.pagerindicator.PagerIndicatorOrientation.Horizontal
import kotlinx.coroutines.launch
import mx.platacard.pagerindicator.internal.CirclePainter
import mx.platacard.pagerindicator.internal.PagerIndicatorInternal
import mx.platacard.pagerindicator.internal.onDotClick

enum class PagerIndicatorOrientation {
Horizontal,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ import androidx.compose.ui.unit.dp
import mx.platacard.pagerindicator.PagerIndicatorOrientation.Horizontal
import mx.platacard.pagerindicator.PagerIndicatorOrientation.Vertical
import kotlinx.coroutines.launch
import mx.platacard.pagerindicator.internal.PagerIndicatorInternal
import mx.platacard.pagerindicator.internal.onDotClick
import mx.platacard.pagerindicator.internal.warmLinePosAsState

/**
* A simple pager indicator that displays dots for each page in the pager.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package mx.platacard.pagerindicator
package mx.platacard.pagerindicator.internal

internal fun calculateDrawableDotIndices(
dotCount: Int,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package mx.platacard.pagerindicator
package mx.platacard.pagerindicator.internal

import androidx.compose.ui.geometry.Size
import androidx.compose.ui.graphics.Color
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package mx.platacard.pagerindicator
package mx.platacard.pagerindicator.internal

import androidx.compose.foundation.Canvas
import androidx.compose.foundation.gestures.detectTapGestures
Expand All @@ -23,6 +23,7 @@ import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import androidx.compose.ui.util.lerp
import mx.platacard.pagerindicator.PagerIndicatorOrientation
import mx.platacard.pagerindicator.PagerIndicatorOrientation.*
import kotlin.math.roundToInt

Expand Down
2 changes: 1 addition & 1 deletion sample/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

android {
namespace = "mx.platacard.sample"
namespace = "mx.platacard.pagerindicator.sample"
compileSdk = 34

defaultConfig {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import androidx.compose.ui.unit.sp
import mx.platacard.pagerindicator.PagerIndicator
import mx.platacard.pagerindicator.PagerIndicatorOrientation
import mx.platacard.pagerindicator.PagerWormIndicator
import mx.platacard.sample.R

class SampleActivity : AppCompatActivity() {

Expand Down

0 comments on commit e29c3de

Please sign in to comment.