Skip to content

Commit

Permalink
Publish SDK artifacts as aar not jar (#1570)
Browse files Browse the repository at this point in the history
The Android ARchieve (aar) format has been around for a long time. The
Android SDK originated from a fork of the AWS Java SDK, which was
publishing Java ARchives (jar). While it possible to conusme jar files
on Android, it is not idiomatic to the platform. Instead, we would like
to publish Android libraries.

This change may require consumers to update their build.gradle, in such
cases as they have '@jar' notation in their dependency specifications.
  • Loading branch information
jamesonwilliams authored Jul 7, 2020
1 parent 215fa90 commit d058d75
Show file tree
Hide file tree
Showing 146 changed files with 1,802 additions and 911 deletions.
23 changes: 19 additions & 4 deletions aws-android-sdk-apigateway-core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
apply plugin: 'java-library'
apply plugin: 'com.android.library'

android {
compileSdkVersion 27

defaultConfig {
minSdkVersion 15
targetSdkVersion 27
versionCode 1
versionName '1.0'
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
api project(':aws-android-sdk-core')
}

sourceCompatibility = '1.7'
targetCompatibility = '1.7'

20 changes: 15 additions & 5 deletions aws-android-sdk-apigateway-core/pom.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-apigateway-core</artifactId>
<packaging>jar</packaging>
<packaging>aar</packaging>
<name>AWS SDK for Android - Amazon API Gateway Client Runtime</name>
<description>The AWS Android SDK for Amazon API Gateway Runtime module holds the runtime library needed by the generated client for APIs defined in Amazon API Gateway.</description>
<url>http://aws.amazon.com/sdkforandroid</url>

<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-pom</artifactId>
<version>2.16.13</version>
</parent>

<dependencies>
<dependency>
<groupId>com.amazonaws</groupId>
Expand All @@ -21,9 +20,20 @@
<version>2.16.13</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>com.simpligility.maven.plugins</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>4.5.0</version>
<extensions>true</extensions>
<configuration>
<sdk>
<platform>${env.ANDROID_PLATFORM}</platform>
<buildTools>${env.ANDROID_BUILDTOOL_VERSION}</buildTools>
</sdk>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand All @@ -34,4 +44,4 @@
</plugin>
</plugins>
</build>
</project>
</project>
4 changes: 4 additions & 0 deletions aws-android-sdk-apigateway-core/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.amazonaws.mobileconnectors.apigateway" />

2 changes: 1 addition & 1 deletion aws-android-sdk-apigateway-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ android {
compileSdkVersion 27

defaultConfig {
minSdkVersion 21
minSdkVersion 15
targetSdkVersion 27
versionCode 1
versionName '1.0'
Expand Down
2 changes: 1 addition & 1 deletion aws-android-sdk-auth-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ android {
compileSdkVersion 27

defaultConfig {
minSdkVersion 11
minSdkVersion 15
targetSdkVersion 27
versionCode 1
versionName '1.0'
Expand Down
10 changes: 2 additions & 8 deletions aws-android-sdk-auth-core/pom.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.amazonaws</groupId>
Expand All @@ -6,7 +7,6 @@
<name>AWS SDK for Android - AWS Authentication Core</name>
<description>The AWS Android SDK for AWS Authentication Core module holds the client classes that are used for enabling communication with Amazon CognitoIdentityProvider, Amazon Cognito UserPools, Facebook and Google SignIn Providers</description>
<url>http://aws.amazon.com/sdkforandroid</url>

<properties>
<project.build.sourceEncoding>
UTF-8
Expand All @@ -15,29 +15,25 @@
UTF-8
</project.reporting.outputEncoding>
</properties>

<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-pom</artifactId>
<version>2.16.13</version>
</parent>

<dependencies>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-core</artifactId>
<optional>false</optional>
<version>2.16.13</version>
</dependency>

<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>4.1.1.4</version>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
Expand All @@ -52,16 +48,14 @@
</sdk>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
</project>
2 changes: 1 addition & 1 deletion aws-android-sdk-auth-facebook/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ android {
compileSdkVersion 27

defaultConfig {
minSdkVersion 11
minSdkVersion 15
targetSdkVersion 27
versionCode 1
versionName '1.0'
Expand Down
11 changes: 2 additions & 9 deletions aws-android-sdk-auth-facebook/pom.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.amazonaws</groupId>
Expand All @@ -6,7 +7,6 @@
<name>AWS SDK for Android - AWS Facebook SignIn</name>
<description>The AWS Android SDK for AWS Facebook SignIn that holds the client classes used for enabling communication with Facebook SignIn</description>
<url>http://aws.amazon.com/sdkforandroid</url>

<properties>
<project.build.sourceEncoding>
UTF-8
Expand All @@ -15,20 +15,17 @@
UTF-8
</project.reporting.outputEncoding>
</properties>

<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-pom</artifactId>
<version>2.16.13</version>
</parent>

<repositories>
<repository>
<id>google-maven</id>
<url>https://maven.google.com</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>com.amazonaws</groupId>
Expand All @@ -43,7 +40,6 @@
<version>4.1.1.4</version>
<scope>provided</scope>
</dependency>

<!-- import facebook-android-sdk while excluding its dependencies -->
<dependency>
<groupId>com.facebook.android</groupId>
Expand All @@ -58,7 +54,6 @@
</exclusion>
</exclusions>
</dependency>

<!-- manually import facebook dependencies -->
<dependency>
<groupId>com.android.support</groupId>
Expand All @@ -68,7 +63,6 @@
<optional>true</optional>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
Expand All @@ -83,7 +77,6 @@
</sdk>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand All @@ -94,4 +87,4 @@
</plugin>
</plugins>
</build>
</project>
</project>
2 changes: 1 addition & 1 deletion aws-android-sdk-auth-google/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ android {
compileSdkVersion 27

defaultConfig {
minSdkVersion 11
minSdkVersion 15
targetSdkVersion 27
versionCode 1
versionName '1.0'
Expand Down
12 changes: 2 additions & 10 deletions aws-android-sdk-auth-google/pom.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.amazonaws</groupId>
Expand All @@ -6,7 +7,6 @@
<name>AWS SDK for Android - AWS Google SignIn</name>
<description>The AWS Android SDK for AWS Google SignIn that holds the client classes that are used for enabling communication with Google SignIn</description>
<url>http://aws.amazon.com/sdkforandroid</url>

<properties>
<project.build.sourceEncoding>
UTF-8
Expand All @@ -15,20 +15,17 @@
UTF-8
</project.reporting.outputEncoding>
</properties>

<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-pom</artifactId>
<version>2.16.13</version>
</parent>

<repositories>
<repository>
<id>google-maven</id>
<url>https://maven.google.com</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>com.amazonaws</groupId>
Expand All @@ -37,22 +34,19 @@
<version>2.16.13</version>
<type>aar</type>
</dependency>

<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>4.1.1.4</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.android.support</groupId>
<artifactId>support-v4</artifactId>
<version>23.0.1</version>
<optional>true</optional>
<type>aar</type>
</dependency>

<dependency>
<groupId>com.google.android.gms</groupId>
<artifactId>play-services-auth</artifactId>
Expand All @@ -61,7 +55,6 @@
<type>aar</type>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
Expand All @@ -76,7 +69,6 @@
</sdk>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand All @@ -87,4 +79,4 @@
</plugin>
</plugins>
</build>
</project>
</project>
2 changes: 1 addition & 1 deletion aws-android-sdk-auth-ui/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ android {
compileSdkVersion 27

defaultConfig {
minSdkVersion 23
minSdkVersion 15
targetSdkVersion 27
versionCode 1
versionName '1.0'
Expand Down
Loading

0 comments on commit d058d75

Please sign in to comment.