-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from futuredapp/feature/setup-gh-actions
Setup gh actions
- Loading branch information
Showing
24 changed files
with
245 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Check PR | ||
on: [pull_request] | ||
|
||
jobs: | ||
pr: | ||
name: PR check | ||
runs-on: [ubuntu-latest] | ||
env: | ||
DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-ruby@v1 | ||
with: | ||
ruby-version: '2.6' | ||
- name: set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- name: Run LintCheck | ||
shell: bash | ||
run: ./gradlew detekt ktlintCheck lint assembleRelease | ||
- name: Run unit tests | ||
shell: bash | ||
run: ./gradlew --continue testRelease | ||
- name: Danger action | ||
uses: MeilCli/danger-action@v2 | ||
continue-on-error: true | ||
with: | ||
plugins_file: 'Gemfile' | ||
danger_file: 'Dangerfile' | ||
danger_id: 'danger-pr' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Check 3.x | ||
on: | ||
push: | ||
branches: | ||
master | ||
|
||
jobs: | ||
master: | ||
name: master check | ||
runs-on: [ubuntu-latest] | ||
env: | ||
SLACK_CHANNEL: android | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- name: Run LintCheck | ||
shell: bash | ||
run: ./gradlew detekt ktlintCheck assembleRelease | ||
- name: Run unit tests | ||
shell: bash | ||
run: ./gradlew --continue testRelease | ||
- name: Slack Notification | ||
if: failure() | ||
uses: homoluctus/slatify@master | ||
with: | ||
type: "failure" | ||
job_name: '*master Check*' | ||
username: GitHub | ||
channel: ${{env.SLACK_CHANNEL}} | ||
url: ${{ secrets.SLACK_WEB_HOOK }} | ||
commit: true | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Release build | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
release: | ||
name: Release build | ||
runs-on: [ubuntu-latest] | ||
env: | ||
EXCLUDE_APK_FILTER: .*unaligned.apk\|.*Test.*.apk | ||
BITRISE_GIT_TAG: ${{github.event.release.name}} | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-ruby@v1 | ||
with: | ||
ruby-version: '2.6' | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- name: Run unit tests | ||
shell: bash | ||
run: ./gradlew --continue testRelease | ||
- name: Upload to Bintray | ||
run: ./gradlew build publish bintrayUpload --stacktrace --no-daemon -PBINTRAY_USER=${{secrets.BINTRAY_USER}} -PBINTRAY_KEY=${{secrets.BINTRAY_KEY}} -PBINTRAY_GPG_KEY=${{secrets.BINTRAY_GPG_KEY}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,29 @@ object ProjectSettings { | |
const val applicationId = "com.thefuntasty.hauler" | ||
const val targetSdk = 29 | ||
const val minSdk = 21 | ||
const val group = "com.thefuntasty.hauler" | ||
val version = System.getenv("BITRISE_GIT_TAG")?:"0.0.1-TEST" | ||
|
||
object Core { | ||
const val artifact = "core" | ||
const val description = "Library containing custom layout which enables to easily create swipe to dismiss Activity" | ||
} | ||
|
||
object Databinding { | ||
const val artifact = "databinding" | ||
const val description = "Databinding extensions for core library" | ||
} | ||
|
||
|
||
object Publish { | ||
const val bintrayRepo = "hauler" | ||
const val siteUrl = "https://github.com/futuredapp/hauler" | ||
const val gitUrl = "https://github.com/futuredapp/hauler.git" | ||
const val developerId = "TheFuntasty" | ||
const val developerName = "TheFuntasty" | ||
const val developerEmail = "[email protected]" | ||
const val licenseName = "MIT Licence" | ||
const val licenseUrl = "https://github.com/futuredapp/hauler/blob/master/LICENSE" | ||
val allLicenses = listOf("MIT") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
apply plugin: 'maven-publish' | ||
apply plugin: "org.jetbrains.dokka-android" | ||
apply plugin: "com.jfrog.bintray" | ||
|
||
project.ext { | ||
mavDevelopers = ["$developerName":"$developerName"] | ||
mavSiteUrl = siteUrl | ||
mavGitUrl = gitUrl | ||
mavProjectName = "$libraryName" | ||
mavLibraryLicenses = ["${allLicenses[0]}":"${licenseUrl}"] | ||
mavLibraryDescription = "$libraryDescription" | ||
} | ||
|
||
publishing { | ||
publications { | ||
JcenterPublication(MavenPublication) { | ||
pom.packaging = "aar" | ||
pom.withXml { | ||
def dependenciesNode = asNode().getAt('dependencies')[0] ?: asNode().appendNode('dependencies') | ||
// Iterate over the compile dependencies (we don't want the test ones), adding a <dependency> node for each | ||
configurations.implementation.allDependencies.each { | ||
// Ensure dependencies such as fileTree are not included. | ||
if (it.name != 'unspecified') { | ||
def dependencyNode = dependenciesNode.appendNode('dependency') | ||
dependencyNode.appendNode('groupId', it.group) | ||
dependencyNode.appendNode('artifactId', it.name) | ||
dependencyNode.appendNode('version', it.version) | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
task sourcesJar(type: Jar) { | ||
archiveClassifier = 'sources' | ||
from android.sourceSets.main.java.srcDirs | ||
} | ||
|
||
dokka { | ||
outputFormat = 'javadoc' | ||
outputDirectory = "$buildDir/dokka" | ||
} | ||
|
||
task kotlinDocJar(type: Jar, dependsOn:dokka){ | ||
archiveClassifier = "javadoc" | ||
from("$buildDir/dokka") | ||
} | ||
|
||
|
||
artifacts { | ||
archives kotlinDocJar | ||
archives sourcesJar | ||
} | ||
|
||
bintray { | ||
|
||
user = project.findProperty("BINTRAY_USER") | ||
key = project.findProperty("BINTRAY_KEY") | ||
|
||
configurations = ['archives'] | ||
publications = ['JcenterPublication'] | ||
|
||
pkg { | ||
repo = bintrayRepo | ||
name = libraryName | ||
desc = libraryDescription | ||
websiteUrl = siteUrl | ||
vcsUrl = gitUrl | ||
licenses = allLicenses | ||
dryRun = false | ||
publish = true | ||
override = false | ||
publicDownloadNumbers = true | ||
version { | ||
gpg { | ||
sign = true | ||
passphrase = project.findProperty("BINTRAY_GPG_KEY") | ||
} | ||
name = ProjectSettings.version | ||
vcsTag = ProjectSettings.version | ||
desc = libraryDescription | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
rootProject.buildFileName = "build.gradle.kts" | ||
|
||
include(":library", ":databinding", ":sample") | ||
include(":core", ":databinding", ":sample") |