Skip to content

Commit 184871a

Browse files
author
mdelgado89
authored
Merge pull request #25 from bleacherreport/feature/git-actions-enable
Update Snapshot CI
2 parents 8a6d068 + fe1fd8d commit 184871a

File tree

13 files changed

+89
-194
lines changed

13 files changed

+89
-194
lines changed

.github/workflows/release-ci.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
env:
8+
JAVA_TOOL_OPTIONS: -Xmx5120m
9+
TERM: dumb
10+
11+
jobs:
12+
build:
13+
name: Build and Publish
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
19+
- name: Copy CI gradle.properties
20+
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
21+
22+
- name: set up JDK
23+
uses: actions/setup-java@v1
24+
with:
25+
java-version: 1.8
26+
27+
- name: Save/Restore Cache
28+
uses: actions/cache@v2
29+
with:
30+
path: |
31+
~/.gradle/caches/modules-*
32+
~/.gradle/caches/jars-*
33+
~/.gradle/caches/build-cache-*
34+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
35+
restore-keys: ${{ runner.os }}-gradle-
36+
37+
- name: Build Velocidapter
38+
run: ./gradlew build
39+
40+
- name: Publish to GitHub Packages
41+
run: ./gradlew publish -PmavenCentralRepositoryUsername=${{ github.actor }} -PmavenCentralRepositoryPassword=${{ secrets.GITHUB_TOKEN }} -PVERSION_NAME=${GITHUB_REF##*v}

.github/workflows/snapshot-ci.yml

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,13 @@
11
name: Snapshots
22

33
on:
4-
pull_request:
5-
branches:
6-
- master
74
push:
85
branches:
96
- master
107

118
env:
129
JAVA_TOOL_OPTIONS: -Xmx5120m
1310
TERM: dumb
14-
releaseStorePassword: ${{ secrets.RELEASESTOREPASSWORD }}
15-
releaseKeyPassword: ${{secrets.KEY_PASSWORD}}
16-
releaseKeyAlias: ${{secrets.KEY_ALIAS}}
17-
FIREBASE_TOKEN: ${{secrets.FIREBASE_TOKEN}}
1811

1912
jobs:
2013
update_draft_release:
@@ -29,11 +22,10 @@ jobs:
2922
build:
3023
if: "!contains(github.event.head_commit.message, 'skip ci')"
3124

32-
name: Build Debug
25+
name: Build and Publish
3326
runs-on: ubuntu-latest
3427

3528
steps:
36-
3729
- uses: actions/checkout@v2
3830

3931
- name: Copy CI gradle.properties
@@ -54,13 +46,8 @@ jobs:
5446
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
5547
restore-keys: ${{ runner.os }}-gradle-
5648

57-
- name: Upload Annotations
49+
- name: Build Velocidapter
5850
run: ./gradlew build
5951

60-
# The USERNAME and TOKEN need to correspond to the credentials environment variables used in
61-
# the publishing section of your build.gradle
62-
- name: Publish to GitHub Packages
63-
run: ./gradlew publish
64-
env:
65-
USERNAME: ${{ github.actor }}
66-
TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
- name: Publish to GitHub Packages
53+
run: ./gradlew publish -PmavenCentralRepositoryUsername=${{ github.actor }} -PmavenCentralRepositoryPassword=${{ secrets.GITHUB_TOKEN }}

bintray/properties.gradle

Lines changed: 0 additions & 18 deletions
This file was deleted.

bintray/upload.gradle

Lines changed: 0 additions & 103 deletions
This file was deleted.

build.gradle

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
1-
apply from: 'bintray/properties.gradle'
21

32
buildscript {
4-
ext.kotlin_version = '1.3.21'
3+
ext.kotlin_version = '1.4.32'
54
repositories {
5+
mavenCentral()
66
google()
77
jcenter()
88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:3.2.1'
10+
classpath 'com.android.tools.build:gradle:4.1.3'
1111
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
12-
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
13-
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
12+
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.14.2'
13+
classpath "org.jetbrains.dokka:dokka-gradle-plugin:1.4.30"
1414
}
1515
}
1616

1717
allprojects {
1818
repositories {
19+
mavenCentral()
1920
google()
2021
jcenter()
2122
}
@@ -27,22 +28,4 @@ task clean(type: Delete) {
2728
delete buildDir
2829
rootProject.clean { dependsOn tasks.matching { it.name == 'clean' } }
2930
}
30-
}
31-
32-
// Bintray upload steps
33-
def annotationsInstall = 'velocidapter-annotations:install'
34-
def annotationsUpload = 'velocidapter-annotations:bintrayUpload'
35-
def mainInstall = 'velocidapter:install'
36-
def mainUpload = 'velocidapter:bintrayUpload'
37-
def androidInstall = 'velocidapter-android:install'
38-
def androidUpload = 'velocidapter-android:bintrayUpload'
39-
40-
task uploadAnnotations(dependsOn: [clean, annotationsInstall, annotationsUpload])
41-
task(annotationsInstall).mustRunAfter(clean)
42-
task(annotationsUpload).mustRunAfter(annotationsInstall)
43-
44-
task uploadMain(dependsOn: [clean, mainInstall, mainUpload, androidInstall, androidUpload])
45-
task(mainInstall).mustRunAfter(clean)
46-
task(mainUpload).mustRunAfter(mainInstall)
47-
task(androidInstall).mustRunAfter(mainUpload)
48-
task(androidUpload).mustRunAfter(androidInstall)
31+
}

gradle.properties

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,24 @@ org.gradle.jvmargs=-Xmx1536m
1414
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1515
# org.gradle.parallel=true
1616

17+
RELEASE_REPOSITORY_URL=https://maven.pkg.github.com/bleacherreport/Velocidapter
18+
SNAPSHOT_REPOSITORY_URL=https://maven.pkg.github.com/bleacherreport/Velocidapter
19+
20+
VERSION_NAME=1.4.2-SNAPSHOT
21+
GROUP=com.bleacherreport.velocidapter
22+
23+
POM_NAME=Velocidapter
24+
POM_DESCRIPTION=Velocidapter
25+
POM_INCEPTION_YEAR=2018
26+
27+
POM_URL=https://github.com/bleacherreport/Velocidapter
28+
POM_SCM_URL=https://github.com/bleacherreport/Velocidapter
29+
POM_SCM_CONNECTION=scm:git@github.com:bleacherreport/Velocidapter.git
30+
POM_SCM_DEV_CONNECTION=scm:git@github.com:bleacherreport/Velocidapter.git
31+
POM_LICENCE_NAME=The Apache Software License, Version 2.0
32+
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
33+
POM_LICENCE_DIST=repo
34+
POM_DEVELOPER_ID=Bleacher Report
35+
POM_DEVELOPER_NAME=Bleacher Report
36+
RELEASE_SIGNING_ENABLED=false
37+
systemProp.org.gradle.internal.publish.checksums.insecure=true
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

velocidapter-android/build.gradle

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
apply plugin: 'com.android.library'
22
apply plugin: 'kotlin-android'
3-
apply plugin: 'com.github.dcendents.android-maven'
4-
apply plugin: 'com.jfrog.bintray'
5-
apply from: '../bintray/upload.gradle'
63

74
android {
85
compileSdkVersion 28
@@ -26,10 +23,8 @@ dependencies {
2623
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
2724
implementation 'androidx.recyclerview:recyclerview:1.0.0'
2825

29-
api 'com.bleacherreport:velocidapter-annotations:1.4.1'
26+
api project(':velocidapter-annotations')
27+
// api 'com.bleacherreport.velocidapter:velocidapter-annotations:1.4.1-SNAPSHOT'
3028
}
3129

32-
repositories {
33-
maven { url 'http://dl.bintray.com/kotlin/kotlin-eap' }
34-
mavenCentral()
35-
}
30+
apply plugin: "com.vanniktech.maven.publish"
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
artifact=velocidapter-android
1+
POM_ARTIFACT_ID=velocidapter-android
22
sourceDirs=android.sourceSets.main.java.srcDirs
3-
packageType=aar
4-
android.enableJetifier=false
3+
POM_PACKAGING=aar
4+
android.enableJetifier=false
Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
apply plugin: 'java-library'
22
apply plugin: 'kotlin'
3-
apply plugin: 'com.github.dcendents.android-maven'
4-
apply plugin: 'com.jfrog.bintray'
5-
apply from: '../bintray/upload.gradle'
3+
apply plugin: 'org.jetbrains.dokka'
64

75
dependencies {
86
implementation fileTree(dir: 'libs', include: ['*.jar'])
97

108
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
119
}
1210

13-
repositories {
14-
maven { url 'http://dl.bintray.com/kotlin/kotlin-eap' }
15-
mavenCentral()
16-
}
11+
apply plugin: "com.vanniktech.maven.publish"

0 commit comments

Comments
 (0)