-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
116 additions
and
50 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,30 @@ | ||
name: Internal deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- development | ||
|
||
jobs: | ||
build-app: | ||
name: Build App | ||
runs-on: ubuntu-latest | ||
env: | ||
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }} | ||
ARTIFACTORY_TOKEN: ${{ secrets.ARTIFACTORY_TOKEN }} | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Gradle cache | ||
uses: gradle/[email protected] | ||
|
||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 11 | ||
cache: 'gradle' | ||
|
||
- name: Publish | ||
run: ./gradlew publishDev |
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 |
---|---|---|
|
@@ -16,11 +16,11 @@ apply plugin: 'signing' | |
apply plugin: 'kotlin-android' | ||
|
||
ext { | ||
splitVersion = '3.3.0' | ||
splitVersion = '3.3.1-alpha-1' | ||
} | ||
|
||
android { | ||
compileSdkVersion 31 | ||
compileSdk 33 | ||
targetCompatibility = '1.8' | ||
sourceCompatibility = '1.8' | ||
|
||
|
@@ -31,8 +31,8 @@ android { | |
|
||
defaultConfig { | ||
|
||
minSdkVersion 15 | ||
targetSdkVersion 30 | ||
minSdk 15 | ||
targetSdk 31 | ||
multiDexEnabled true | ||
|
||
consumerProguardFiles 'split-proguard-rules.pro' | ||
|
@@ -159,6 +159,60 @@ dependencies { | |
androidTestImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlinVer" | ||
} | ||
|
||
def splitPOM = { | ||
name = 'Split Android SDK' | ||
packaging = 'aar' | ||
description = 'Official Split Android SDK' | ||
url = 'https://github.com/splitio/android-client' | ||
|
||
licenses { | ||
license { | ||
name = 'The Apache License, Version 2.0' | ||
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id = 'sarrubia' | ||
name = 'Sebastian Arrubia' | ||
email = '[email protected]' | ||
} | ||
|
||
developer { | ||
id = 'fernando' | ||
name = 'Fernando Martin' | ||
email = '[email protected]' | ||
} | ||
} | ||
|
||
scm { | ||
connection = 'scm:git:[email protected]:splitio/android-client.git' | ||
developerConnection = 'scm:[email protected]:splitio/android-client.git' | ||
url = 'https://github.com/splitio/android-client' | ||
} | ||
} | ||
|
||
def releaseRepo = { | ||
name = "ReleaseRepo" | ||
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/" | ||
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/" | ||
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl | ||
credentials { | ||
username = ossrhUsername | ||
password = ossrhPassword | ||
} | ||
} | ||
|
||
def devRepo = { | ||
name = "DevelopmentRepo" | ||
url = 'https://splitio.jfrog.io/artifactory/maven-all-virtual' | ||
credentials { | ||
username = System.getenv('ARTIFACTORY_USER') | ||
password = System.getenv('ARTIFACTORY_TOKEN') | ||
} | ||
} | ||
|
||
afterEvaluate { | ||
android.sourceSets.all { sourceSet -> | ||
if (!sourceSet.name.startsWith("test")) { | ||
|
@@ -168,7 +222,6 @@ afterEvaluate { | |
|
||
publishing { | ||
publications { | ||
project.components.all { print("PRJ NAME: " + name) } | ||
release(MavenPublication) { | ||
from components.release | ||
|
||
|
@@ -177,60 +230,43 @@ afterEvaluate { | |
artifact sourcesJar | ||
artifact javadocJar | ||
|
||
pom { | ||
name = 'Split Android SDK' | ||
packaging = 'aar' | ||
description = 'Official Split Android SDK' | ||
url = 'https://github.com/splitio/android-client' | ||
|
||
licenses { | ||
license { | ||
name = 'The Apache License, Version 2.0' | ||
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id = 'sarrubia' | ||
name = 'Sebastian Arrubia' | ||
email = '[email protected]' | ||
} | ||
|
||
developer { | ||
id = 'fernando' | ||
name = 'Fernando Martin' | ||
email = '[email protected]' | ||
} | ||
} | ||
|
||
scm { | ||
connection = 'scm:git:[email protected]:splitio/android-client.git' | ||
developerConnection = 'scm:[email protected]:splitio/android-client.git' | ||
url = 'https://github.com/splitio/android-client' | ||
} | ||
} | ||
pom splitPOM | ||
|
||
repositories { | ||
maven { | ||
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/" | ||
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/" | ||
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl | ||
credentials { | ||
username = ossrhUsername | ||
password = ossrhPassword | ||
} | ||
} | ||
maven releaseRepo | ||
maven devRepo | ||
} | ||
} | ||
|
||
development(MavenPublication) { | ||
from components.release | ||
|
||
groupId = 'io.split.client' | ||
version = splitVersion | ||
artifact sourcesJar | ||
artifact javadocJar | ||
|
||
pom splitPOM | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
sign publishing.publications | ||
task publishRelease(type: PublishToMavenRepository) { | ||
publication = publishing.publications.getByName("release") | ||
repository = publishing.repositories.ReleaseRepo | ||
} | ||
|
||
task publishDev(type: PublishToMavenRepository) { | ||
publication = publishing.publications.getByName("development") | ||
repository = publishing.repositories.DevelopmentRepo | ||
} | ||
|
||
signing { | ||
sign publishing.publications.getByName("release") | ||
} | ||
} | ||
|
||
|
||
task sourcesJar(type: Jar) { | ||
archiveClassifier.set("sources") | ||
from android.sourceSets.main.java.srcDirs | ||
|