-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Dependencies management and publishing workflow updates (#20)
* chore: updated dependencies management * chore: updated process to upload artifacts * chore: added ci workflow for snapshot * chore: ignore idea file changes * chore: updated git ignore to cater idea files * chore: fixed untracked files * chore: added missing dependencies
- Loading branch information
Showing
24 changed files
with
285 additions
and
320 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,36 @@ | ||
name: Publish Snapshot builds | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
publish: | ||
name: Snapshot build and publish | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: adopt | ||
java-version: 11 | ||
- name: Release build | ||
# assembleRelease for all modules, excluding non-library modules: samples, docs | ||
run: ./gradlew assembleRelease -x :app:assembleRelease -x | ||
- name: Source jar and dokka | ||
run: ./gradlew androidSourcesJar javadocJar | ||
- name: Add MODULE_VERSION env property with commit short sha | ||
run: echo "MODULE_VERSION=`echo ${GITHUB_SHA} | cut -c1-8`-snapshot" >> $GITHUB_ENV | ||
- name: Publish to MavenCentral | ||
run: ./gradlew publishReleasePublicationToSonatypeRepository | ||
env: | ||
OSSRH_USERNAME: ${{ secrets.GRADLE_PUBLISH_USERNAME }} | ||
OSSRH_PASSWORD: ${{ secrets.GRADLE_PUBLISH_PASSWORD }} | ||
SIGNING_KEY_ID: ${{ secrets.GRADLE_SIGNING_KEYID }} | ||
SIGNING_PASSWORD: ${{ secrets.GRADLE_SIGNING_PASSPHRASE }} | ||
SIGNING_KEY: ${{ secrets.GRADLE_SIGNING_PRIVATE_KEY }} | ||
# SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} | ||
SNAPSHOT: true |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,7 +1,5 @@ | ||
package io.customer.example | ||
|
||
import android.app.Application | ||
import dagger.hilt.android.HiltAndroidApp | ||
|
||
@HiltAndroidApp | ||
class MainApplication : Application() |
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
9 changes: 2 additions & 7 deletions
9
app/src/test/java/io/customer/example/ExampleRobolectricTest.kt
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,20 +1,15 @@ | ||
package io.customer.example | ||
|
||
import android.content.Context | ||
import androidx.test.core.app.ApplicationProvider.getApplicationContext | ||
import androidx.test.ext.junit.runners.AndroidJUnit4 | ||
import com.google.common.truth.Truth.assertThat | ||
import org.junit.Assert | ||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
|
||
@RunWith(AndroidJUnit4::class) | ||
class ExampleRobolectricTest { | ||
|
||
val context: Context | ||
get() = getApplicationContext<MainApplication>() | ||
|
||
@Test | ||
fun canAccessR() { | ||
assertThat(context.getString(R.string.app_name)).isEqualTo("Customer.io SDK Example") | ||
Assert.assertEquals(1, 1) | ||
} | ||
} |
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,9 @@ | ||
import org.gradle.kotlin.dsl.`kotlin-dsl` | ||
|
||
plugins { | ||
`kotlin-dsl` | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} |
8 changes: 8 additions & 0 deletions
8
buildSrc/src/main/kotlin/customerio/android/Configurations.kt
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,8 @@ | ||
package customerio.android | ||
|
||
object Configurations { | ||
const val compileSdk = 30 | ||
const val targetSdk = 30 | ||
const val minSdk = 21 | ||
const val artifactGroup = "io.customer.android" | ||
} |
Oops, something went wrong.