Skip to content

Publish to mavenCentral() with plugin #81

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 28 additions & 26 deletions .github/workflows/Android-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
uses: malinskiy/action-android/install-sdk@release/0.1.4
- name: Build project
run: ./gradlew assembleDebug
- name: Deploy test (Don't merge)
run: ./gradlew publishMavenPublicationToMavenRepository
- name: Run tests
run: ./gradlew test
- name: Test jitpack publish command
Expand Down Expand Up @@ -54,29 +56,29 @@ jobs:
path: |
MPChartExample/build/outputs/connected_android_test_additional_output/debugAndroidTest/connected
MPChartExample/build/outputs/androidTest-results/connected
Check:
name: Check
runs-on: ubuntu-latest
strategy:
matrix:
java_version: [ 11 ]
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Install JDK ${{ matrix.java_version }}
uses: actions/setup-java@v3
with:
distribution: "adopt"
java-version: ${{ matrix.java_version }}
- name: Install Android SDK
uses: malinskiy/action-android/install-sdk@release/0.1.4
- name: Code checks
run: ./gradlew check
- name: Archive Lint report
uses: actions/[email protected]
if: ${{ always() }}
with:
name: Chart-Lint-report
path: ./**/build/reports/lint-results*.html
# Check:
# name: Check
# runs-on: ubuntu-latest
# strategy:
# matrix:
# java_version: [ 11 ]
# steps:
# - name: Checkout
# uses: actions/[email protected]
# with:
# fetch-depth: 0
# - name: Install JDK ${{ matrix.java_version }}
# uses: actions/setup-java@v3
# with:
# distribution: "adopt"
# java-version: ${{ matrix.java_version }}
# - name: Install Android SDK
# uses: malinskiy/action-android/install-sdk@release/0.1.4
# - name: Code checks
# run: ./gradlew check
# - name: Archive Lint report
# uses: actions/[email protected]
# if: ${{ always() }}
# with:
# name: Chart-Lint-report
# path: ./**/build/reports/lint-results*.html
10 changes: 6 additions & 4 deletions MPChartLib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ plugins {
id "com.vanniktech.maven.publish" version "0.22.0"
}

apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle'

ext {
mGroupId = "info.appdevnext"
mArtifactId = "chart"
Expand Down Expand Up @@ -42,10 +44,10 @@ dependencies {
testImplementation 'junit:junit:4.13.2'
}

task androidSourcesJar(type: Jar) {
archiveClassifier.set('sources')
from android.sourceSets.main.java.srcDirs
}
//task androidSourcesJar(type: Jar) {
// archiveClassifier.set('sources')
// from android.sourceSets.main.java.srcDirs
//}

group = "info.mxtracks"
version = "${getTag()}"
Expand Down
3 changes: 3 additions & 0 deletions MPChartLib/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
POM_NAME=Andorid Chart
POM_ARTIFACT_ID=library
POM_PACKAGING=aar
20 changes: 15 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@ android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx2048M

#SONATYPE_HOST=DEFAULT
# or when publishing to https://s01.oss.sonatype.org
SONATYPE_HOST=S01
RELEASE_SIGNING_ENABLED=true
POM_ARTIFACT_ID=chart
# TODO use right, and currently unknown, credentials
VERSION_NAME=0.9.2-SNAPSHOT
VERSION_CODE=92
GROUP=info.mxtracks

POM_DESCRIPTION=A powerful Android chart view / graph view library, supporting line- bar- pie- radar- bubble- and candlestick charts as well as scaling, dragging and animations.
POM_URL=https://github.com/AppDevNext/AndroidChart
POM_SCM_URL=https://github.com/AppDevNext/AndroidChart
POM_SCM_CONNECTION=scm:[email protected]:AppDevNext/AndroidChart.git
POM_SCM_DEV_CONNECTION=scm:[email protected]:AppDevNext/AndroidChart.git
POM_LICENCE_NAME=The Apache Software License, Version 2.0
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
POM_LICENCE_DIST=repo
POM_DEVELOPER_ID=hannesa2
POM_DEVELOPER_NAME=Hannes A