Amadis

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Table of contents

The Amadis One components are delivered through an intermediate repository called JFrog Artifactory. This repository allows up to upload and hold artifacts (AAR or Docker) that customers can access whenever they need, provided they have the proper credentials.

Credentials will be provided upon demand or account setup

AAR and Android project integration

Android project structure

page1image3353689872page1image3353690160

The Android application must declare a JFrog Artifactory account to access the SDK dependencies.

Gradle files configuration

gradle.properties

The gradle.properties file must declare the Artifactory server URL as well as the repos name.

android.useAndroidX=true
android.enableJetifier=true

artifactory_url=https://amadis.jfrog.io/artifactory
repository_name=amadis-agnos-libs-release

local.properties

The local.properties file should contain the login and password needed to access the repos.

 artifactory_user=user@gmail.com
 artifactory_password=Aqzefj6&

No quote on the password

local.properties should not be versioned in your CVS system

build.gradle (root)

The root build.gradle file should read the credentials from the local.properties files.

Properties properties = new Properties() 
properties.load(project.rootProject.file('local.properties').newDataInputStream())
def artifactory_user = properties.getProperty('artifactory_user')
def artifactory_password = properties.getProperty('artifactory_password')

Then declare the repositories on which to look for dependencies.

allprojects { 
  repositories {
    google()  
    mavenCentral()
    
    maven { 
      url 'https://jitpack.io' 
    }
    
    maven {
      url ""${artifactory_url}/${repository_name}"
      // The Artifactory (preferably virtual) repository to resolve from 
      credentials {
        username "${artifactory_user}"
        password "${artifactory_password}" }
    } 
  }
}

build.gradle (app or module)

The app/module build.gradle file should simply declare its dependencies in the form of implementations.

plugins {
  id 'com.android.application' 
}

android { 
  compileSdkVersion 31
  defaultConfig {
    ...
  }
  
  buildTypes {
    ...
  }
  
  compileOptions {
    ...
  }
}
  
dependencies {
  ...
  implementation 'ca.amadis.agnos:agnos-amadis-sred:3.5.7' 
}

Agnos is the only dependency that needs to be declared. The Secure Client (secclt) is a transitive dependency and will be automatically downloaded if required.

  • No labels