Skip to content

Commit 16bfa71

Browse files
committed
Publish to mavenCentral() with plugin
New tasks: publishAllPublicationsToMavenRepository - Publishes all Maven publications produced by this project to the maven repository. publishMavenPublicationToMavenRepository - Publishes Maven publication 'maven' to Maven repository 'maven'.
1 parent fa33f23 commit 16bfa71

File tree

4 files changed

+53
-30
lines changed

4 files changed

+53
-30
lines changed

.github/workflows/Android-CI.yml

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727
uses: malinskiy/action-android/install-sdk@release/0.1.4
2828
- name: Build project
2929
run: ./gradlew assembleDebug
30+
- name: Deploy test (Don't merge)
31+
run: ./gradlew publishMavenPublicationToMavenRepository
3032
- name: Run tests
3133
run: ./gradlew test
3234
- name: Run instrumentation tests
@@ -52,29 +54,29 @@ jobs:
5254
path: |
5355
MPChartExample/build/outputs/connected_android_test_additional_output/debugAndroidTest/connected
5456
MPChartExample/build/outputs/androidTest-results/connected
55-
Check:
56-
name: Check
57-
runs-on: ubuntu-latest
58-
strategy:
59-
matrix:
60-
java_version: [ 11 ]
61-
steps:
62-
- name: Checkout
63-
uses: actions/checkout@v3.2.0
64-
with:
65-
fetch-depth: 0
66-
- name: Install JDK ${{ matrix.java_version }}
67-
uses: actions/setup-java@v3
68-
with:
69-
distribution: "adopt"
70-
java-version: ${{ matrix.java_version }}
71-
- name: Install Android SDK
72-
uses: malinskiy/action-android/install-sdk@release/0.1.4
73-
- name: Code checks
74-
run: ./gradlew check
75-
- name: Archive Lint report
76-
uses: actions/upload-artifact@v3.1.1
77-
if: ${{ always() }}
78-
with:
79-
name: Chart-Lint-report
80-
path: ./**/build/reports/lint-results*.html
57+
# Check:
58+
# name: Check
59+
# runs-on: ubuntu-latest
60+
# strategy:
61+
# matrix:
62+
# java_version: [ 11 ]
63+
# steps:
64+
# - name: Checkout
65+
# uses: actions/checkout@v3.2.0
66+
# with:
67+
# fetch-depth: 0
68+
# - name: Install JDK ${{ matrix.java_version }}
69+
# uses: actions/setup-java@v3
70+
# with:
71+
# distribution: "adopt"
72+
# java-version: ${{ matrix.java_version }}
73+
# - name: Install Android SDK
74+
# uses: malinskiy/action-android/install-sdk@release/0.1.4
75+
# - name: Code checks
76+
# run: ./gradlew check
77+
# - name: Archive Lint report
78+
# uses: actions/upload-artifact@v3.1.1
79+
# if: ${{ always() }}
80+
# with:
81+
# name: Chart-Lint-report
82+
# path: ./**/build/reports/lint-results*.html

MPChartLib/build.gradle

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ plugins {
33
id 'maven-publish'
44
}
55

6+
apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle'
7+
68
ext {
79
mGroupId = "info.appdevnext"
810
mArtifactId = "chart"
@@ -41,10 +43,10 @@ dependencies {
4143
testImplementation 'junit:junit:4.13.2'
4244
}
4345

44-
task androidSourcesJar(type: Jar) {
45-
archiveClassifier.set('sources')
46-
from android.sourceSets.main.java.srcDirs
47-
}
46+
//task androidSourcesJar(type: Jar) {
47+
// archiveClassifier.set('sources')
48+
// from android.sourceSets.main.java.srcDirs
49+
//}
4850

4951
project.afterEvaluate {
5052
publishing {

MPChartLib/gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
POM_NAME=Andorid Chart
2+
POM_ARTIFACT_ID=library
3+
POM_PACKAGING=aar

gradle.properties

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
11
android.enableJetifier=true
22
android.useAndroidX=true
33
org.gradle.jvmargs=-Xmx2048M
4+
5+
# TODO use right, and currently unknown, credentials
6+
VERSION_NAME=0.9.2-SNAPSHOT
7+
VERSION_CODE=92
8+
GROUP=info.mxtracks
9+
10+
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.
11+
POM_URL=https://github.com/AppDevNext/AndroidChart
12+
POM_SCM_URL=https://github.com/AppDevNext/AndroidChart
13+
POM_SCM_CONNECTION=scm:git@github.com:AppDevNext/AndroidChart.git
14+
POM_SCM_DEV_CONNECTION=scm:git@github.com:AppDevNext/AndroidChart.git
15+
POM_LICENCE_NAME=The Apache Software License, Version 2.0
16+
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
17+
POM_LICENCE_DIST=repo
18+
POM_DEVELOPER_ID=hannesa2
19+
POM_DEVELOPER_NAME=Hannes A

0 commit comments

Comments
 (0)