added copperlabs-pose-api support
This commit is contained in:
parent
1de0e850e1
commit
cdaf7405a8
|
@ -43,9 +43,11 @@ android {
|
|||
dependencies {
|
||||
|
||||
mavenImplementation 'ca.copperlabs.cv:copperlabs-computer-vision:0.0.1-alpha'
|
||||
|
||||
localImplementation project(':copperlabs-computer-vision')
|
||||
implementation project(':copperlabs-pose-api')
|
||||
|
||||
mavenImplementation "ca.copperlabs.mediapipe.posetracking:copperlabs-pose-api:0.0.1-alpha"
|
||||
localImplementation project(':copperlabs-pose-api')
|
||||
|
||||
implementation project(':copperlabs-pose-detection')
|
||||
implementation project(':copperlabs-pose-landmark')
|
||||
implementation project(':copperlabs-pose-graph')
|
||||
|
|
|
@ -4,8 +4,7 @@ plugins {
|
|||
id 'com.android.library' version '7.3.1' apply false
|
||||
|
||||
}
|
||||
def githubProperties = new Properties()
|
||||
githubProperties.load(new FileInputStream(rootProject.file("github.properties")))
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@ plugins {
|
|||
}
|
||||
|
||||
|
||||
def githubProperties = new Properties()
|
||||
githubProperties.load(new FileInputStream(rootProject.file("github.properties"))) //Set env variable GPR_USER & GPR_API_KEY if not adding a properties file
|
||||
|
||||
def getVersionName = { ->
|
||||
return "0.0.1-alpha" // Replace with version Name
|
||||
|
@ -32,8 +30,13 @@ publishing {
|
|||
if (dep.group == null || dep.version == null || dep.name == null || dep.name == "unspecified")
|
||||
return
|
||||
final dependencyNode = dependenciesNode.appendNode('dependency')
|
||||
|
||||
dependencyNode.appendNode('groupId', dep.group)
|
||||
// if (dep.name=='copperlabs-pose-api'){
|
||||
// dependencyNode.appendNode('artifactId', 'ca.copperlabs.mediapipe.posetracking')
|
||||
// }else {
|
||||
dependencyNode.appendNode('artifactId', dep.name)
|
||||
// }
|
||||
dependencyNode.appendNode('version', dep.version)
|
||||
dependencyNode.appendNode('scope', scope)
|
||||
if (!dep.transitive) {
|
||||
|
@ -51,6 +54,8 @@ publishing {
|
|||
|
||||
configurations.compileOnly.getDependencies().each { dep -> addDependency(dep, "compile") }
|
||||
configurations.api.getDependencies().each { dep -> addDependency(dep, "compile") }
|
||||
|
||||
configurations.mavenImplementation.getDependencies().each { dep -> addDependency(dep, "runtime") }
|
||||
configurations.implementation.getDependencies().each { dep -> addDependency(dep, "runtime") }
|
||||
}
|
||||
}
|
||||
|
@ -69,8 +74,8 @@ publishing {
|
|||
** gpr.usr=GITHUB_USER_ID & gpr.key=PERSONAL_ACCESS_TOKEN
|
||||
** Set env variable GPR_USER & GPR_API_KEY if not adding a properties file**/
|
||||
|
||||
username = githubProperties['gpr.usr'] ?: System.getenv("GPR_USER")
|
||||
password = githubProperties['gpr.key'] ?: System.getenv("GPR_API_KEY")
|
||||
username = System.getenv("USERNAME")
|
||||
password = System.getenv("TOKEN")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -99,11 +104,22 @@ android {
|
|||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
flavorDimensions 'source'
|
||||
productFlavors {
|
||||
local {
|
||||
dimension 'source'
|
||||
}
|
||||
maven {
|
||||
dimension 'source'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly fileTree(dir: '../common_libs', include: ['*.jar', '*.aar'])
|
||||
implementation project(':copperlabs-pose-api')
|
||||
|
||||
localImplementation project(':copperlabs-pose-api')
|
||||
mavenImplementation "ca.copperlabs.mediapipe.posetracking:copperlabs-pose-api:0.0.1-alpha"
|
||||
|
||||
// Mediapipe dependencies
|
||||
implementation 'com.google.protobuf:protobuf-javalite:3.19.1'
|
||||
|
|
|
@ -1,9 +1,80 @@
|
|||
plugins {
|
||||
id 'com.android.library'
|
||||
id("maven-publish")
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
def getVersionName = { ->
|
||||
return "0.0.1" // Replace with version Name
|
||||
}
|
||||
|
||||
def getArtificatId = { ->
|
||||
return "copperlabs-pose-api" // Replace with library name ID
|
||||
}
|
||||
def getGroupId = {-> return 'ca.copperlabs.mediapipe.posetracking'}
|
||||
|
||||
publishing {
|
||||
|
||||
publications {
|
||||
bar(MavenPublication) {
|
||||
groupId getGroupId()
|
||||
artifactId getArtificatId()
|
||||
version getVersionName()
|
||||
artifact("$buildDir/outputs/aar/${getArtificatId()}-release.aar")
|
||||
//generate .pom file with transitive dependencies
|
||||
pom.withXml {
|
||||
final dependenciesNode = asNode().appendNode('dependencies')
|
||||
ext.addDependency = { Dependency dep, String scope ->
|
||||
if (dep.group == null || dep.version == null || dep.name == null || dep.name == "unspecified")
|
||||
return
|
||||
final dependencyNode = dependenciesNode.appendNode('dependency')
|
||||
dependencyNode.appendNode('groupId', dep.group)
|
||||
dependencyNode.appendNode('artifactId', dep.name)
|
||||
dependencyNode.appendNode('version', dep.version)
|
||||
dependencyNode.appendNode('scope', scope)
|
||||
if (!dep.transitive) {
|
||||
final exclusionNode = dependencyNode.appendNode('exclusions').appendNode('exclusion')
|
||||
exclusionNode.appendNode('groupId', '*')
|
||||
exclusionNode.appendNode('artifactId', '*')
|
||||
} else if (!dep.properties.excludeRules.empty) {
|
||||
final exclusionNode = dependencyNode.appendNode('exclusions').appendNode('exclusion')
|
||||
dep.properties.excludeRules.each { ExcludeRule rule ->
|
||||
exclusionNode.appendNode('groupId', rule.group ?: '*')
|
||||
exclusionNode.appendNode('artifactId', rule.module ?: '*')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
configurations.compileOnly.getDependencies().each { dep -> addDependency(dep, "compile") }
|
||||
configurations.api.getDependencies().each { dep -> addDependency(dep, "compile") }
|
||||
configurations.implementation.getDependencies().each { dep -> addDependency(dep, "runtime") }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
name = "GitHubPackages"
|
||||
/** Configure path of your package repository on Github
|
||||
** Replace GITHUB_USERID with your/organisation Github userID
|
||||
** and REPOSITORY with the repository name on GitHub
|
||||
*/
|
||||
url = uri("https://maven.pkg.github.com/udamaster/mediapipe")
|
||||
credentials {
|
||||
/** Create github.properties in root project folder file with
|
||||
** gpr.usr=GITHUB_USER_ID & gpr.key=PERSONAL_ACCESS_TOKEN
|
||||
** Set env variable GPR_USER & GPR_API_KEY if not adding a properties file**/
|
||||
|
||||
username = System.getenv("USERNAME")
|
||||
password = System.getenv("TOKEN")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
android {
|
||||
namespace 'ca.copperlabs.mediapipe.posetracking'
|
||||
namespace getGroupId()
|
||||
compileSdk 32
|
||||
|
||||
defaultConfig {
|
||||
|
|
|
@ -5,6 +5,8 @@ pluginManagement {
|
|||
gradlePluginPortal()
|
||||
google()
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
|
||||
maven {
|
||||
name = "GitHubPackages"
|
||||
/* Configure path to the library hosted on GitHub Packages Registry
|
||||
|
@ -21,6 +23,7 @@ pluginManagement {
|
|||
password = System.getenv("TOKEN")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,6 +32,8 @@ dependencyResolutionManagement {
|
|||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
|
||||
maven {
|
||||
name = "GitHubPackages"
|
||||
/* Configure path to the library hosted on GitHub Packages Registry
|
||||
|
|
Loading…
Reference in New Issue
Block a user