Skip to content

Commit

Permalink
jCenter publication
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Gorisse committed Jan 12, 2021
1 parent 975e4af commit 68b6780
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 4 deletions.
47 changes: 45 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@
// Top-level build file where you can add configuration options common to
// all sub-projects/modules.

project.ext {
mavenGroupId = 'com.gorisse.thomas.sceneform'
mavenVersion = '1.18.0'
mavenDesc = 'Sceneform Core'
mavenWebsiteUrl = 'https://github.com/thomasgorisse/sceneform-android-sdk'
mavenIssueTrackerUrl = 'https://github.com/thomasgorisse/sceneform-android-sdk/issues'
mavenVCSUrl = 'https://github.com/thomasgorisse/sceneform-android-sdk.git'
mavenLicenses = ['Apache-2.0']
mavenLabels = ['android', 'sceneform', 'arcore', 'filament']
mavenGithubRepo = 'thomasgorisse/sceneform-android-sdk'
mavenGithubReleaseNotesFile = 'README.md'
}
buildscript {
repositories {
google()
Expand All @@ -23,8 +35,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.1'
}
}

Expand All @@ -39,3 +50,35 @@ allprojects {
task clean(type: Delete) {
delete rootProject.buildDir
}

subprojects { project ->

apply plugin: 'com.jfrog.bintray'

Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())

bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")
publications = ['releasePublication']
pkg {
repo = "maven"
name = "$project.mavenGroupId:$project.name"
desc = project.mavenDesc
websiteUrl = project.mavenWebsiteUrl
issueTrackerUrl = project.mavenIssueTrackerUrl
vcsUrl = project.mavenVCSUrl
licenses = project.mavenLicenses
labels = project.mavenLabels
publicDownloadNumbers = true
githubRepo = project.mavenGithubRepo
githubReleaseNotesFile = project.mavenGithubReleaseNotesFile
version {
name = project.mavenVersion
vcsTag = project.mavenVersion
released = new Date()
}
}
}
}
20 changes: 20 additions & 0 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,23 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.1'
}

// Generate Source Jar
task sourceJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier "sources"
}

afterEvaluate {
publishing {
publications {
releasePublication(MavenPublication) {
groupId = project.mavenGroupId
artifactId = project.name
version = project.mavenVersion
artifact(sourceJar)
artifact("$buildDir/outputs/aar/${project.getName()}-release.aar")
}
}
}
}
25 changes: 23 additions & 2 deletions ux/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* limitations under the License.
*/
apply plugin: 'com.android.library'
apply plugin: 'maven-publish'

android {
compileSdkVersion 30
Expand Down Expand Up @@ -46,7 +47,27 @@ dependencies {
implementation 'com.google.android.material:material:1.2.1'
}

task compileUxAssets {
//task compileUxAssets {
//}

//preBuild.dependsOn compileUxAssets

// Generate Source Jar
task sourceJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier "sources"
}

preBuild.dependsOn compileUxAssets
afterEvaluate {
publishing {
publications {
releasePublication(MavenPublication) {
groupId = project.mavenGroupId
artifactId = project.name
version = project.mavenVersion
artifact(sourceJar)
artifact("$buildDir/outputs/aar/${project.getName()}-release.aar")
}
}
}
}

0 comments on commit 68b6780

Please sign in to comment.