Skip to content

Commit ebdb1b7

Browse files
authored
Merge pull request #7 from aws-amplify/tjroach/component-prep
chore(all): Prep for ui components
2 parents 64b7bd1 + 4dfb78d commit ebdb1b7

File tree

12 files changed

+809
-7
lines changed

12 files changed

+809
-7
lines changed

.gitignore

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
.DS_Store
2+
3+
# Built application files
4+
*.apk
5+
*.ap_
6+
7+
# Files for the ART/Dalvik VM
8+
*.dex
9+
10+
# Java class files
11+
*.class
12+
13+
# Generated files
14+
bin/
15+
gen/
16+
out/
17+
18+
# Gradle files
19+
.gradle/
20+
build/
21+
.gradle/**
22+
23+
# Local configuration file (sdk path, etc)
24+
local.properties
25+
26+
# Proguard folder generated by Eclipse
27+
proguard/
28+
29+
# Log Files
30+
*.log
31+
32+
# Android Studio Navigation editor temp files
33+
.navigation/
34+
35+
# Android Studio captures folder
36+
captures/
37+
38+
# IntelliJ
39+
*.iml
40+
**/*.iml
41+
.idea/workspace.xml
42+
.idea/tasks.xml
43+
.idea/gradle.xml
44+
.idea/assetWizardSettings.xml
45+
.idea/dictionaries
46+
.idea/libraries
47+
.idea/caches
48+
.idea/misc.xml
49+
.idea/**
50+
51+
# VIM
52+
*.swp
53+
*.swo
54+
55+
# Keystore files
56+
# Uncomment the following line if you do not want to check your keystore files in.
57+
*.jks
58+
59+
# External native build folder generated in Android Studio 2.2 and later
60+
.externalNativeBuild
61+
62+
# Google Services (e.g. APIs or Firebase)
63+
google-services.json
64+
65+
# Freeline
66+
freeline.py
67+
freeline/
68+
freeline_project_description.json
69+
70+
# fastlane
71+
scripts/fastlane/report.xml
72+
scripts/fastlane/Preview.html
73+
scripts/fastlane/screenshots
74+
scripts/fastlane/test_output
75+
scripts/fastlane/readme.md
76+
77+
# maven file
78+
target/
79+
80+
#python comile
81+
__pycache__/
82+
83+
# Credentials
84+
**/awsconfiguration.json
85+
**/amplifyconfiguration.json
86+
**/amplifyconfiguration_v2.json
87+
**/credentials.json
88+
**/google_client_creds.json
89+
90+
# IDE files
91+
.idea/**
92+
93+
# Gradle
94+
.gradle/**
95+
96+
#amplify
97+
amplify/
98+
build/
99+
dist/
100+
node_modules/
101+
aws-exports.js
102+
awsconfiguration.json
103+
amplifyconfiguration.json
104+
105+
test-results/
106+
build-artifacts/
107+
build-artifacts.tar.gz
108+
109+
# add ignore for jenv
110+
.java-version
111+
112+
# sample app resources
113+
.graphqlconfig.yml
114+
aws-datastore/src/androidTest/res/raw/amplifyconfigurationupdated.json

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,16 @@
22

33
---
44

5-
# Amplify UI for Kotlin
5+
# Amplify UI for Android
66

7-
[![GitHub](https://img.shields.io/github/license/aws-amplify/amplify-ui-kotlin)](LICENSE)
7+
[![GitHub](https://img.shields.io/github/license/aws-amplify/amplify-ui-android)](LICENSE)
88
[![Discord](https://img.shields.io/discord/308323056592486420?logo=discord)](https://discord.gg/jWVbPfC)
9-
[![Open Bugs](https://img.shields.io/github/issues/aws-amplify/amplify-ui-kotlin/bug?color=d73a4a&label=bugs)](https://github.com/aws-amplify/amplify-ui-kotlin/issues?q=is%3Aissue+is%3Aopen+label%3Abug)
10-
[![Feature Requests](https://img.shields.io/github/issues/aws-amplify/amplify-ui-kotlin/feature-request?color=ff9001&label=feature%20requests)](https://github.com/aws-amplify/amplify-ui-kotlin/issues?q=is%3Aissue+label%3Afeature-request+is%3Aopen)
9+
[![Open Bugs](https://img.shields.io/github/issues/aws-amplify/amplify-ui-android/bug?color=d73a4a&label=bugs)](https://github.com/aws-amplify/amplify-ui-android/issues?q=is%3Aissue+is%3Aopen+label%3Abug)
10+
[![Feature Requests](https://img.shields.io/github/issues/aws-amplify/amplify-ui-android/feature-request?color=ff9001&label=feature%20requests)](https://github.com/aws-amplify/amplify-ui-android/issues?q=is%3Aissue+label%3Afeature-request+is%3Aopen)
1111

12-
Amplify UI for Kotlin is an open-source UI library with components that are endlessly customizable, accessible, and can integrate into _any_ Kotlin application. Amplify UI consists of:
12+
Amplify UI for Android is an open-source UI library with components that are endlessly customizable, accessible, and can integrate into _any_ Android application. Amplify UI consists of:
1313

14-
1. Connected components that simplify complex cloud-connected workflows, like Authenticator.
15-
2. Primitive components that create consistency across Amplify UI and allow you to build complete applications that fit your brand, like Buttons and Badges.
14+
1. Connected components that simplify complex cloud-connected workflows.
1615
3. Theming capabilities that allow you to customize the appearance of Amplify UI to match your brand.
1716

1817
## Contributing

build.gradle

Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2+
buildscript {
3+
repositories {
4+
google()
5+
mavenCentral()
6+
maven {
7+
url "https://plugins.gradle.org/m2/"
8+
}
9+
}
10+
dependencies {
11+
classpath 'com.android.tools.build:gradle:7.3.1'
12+
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.10'
13+
classpath "org.jetbrains.dokka:dokka-gradle-plugin:1.8.10"
14+
classpath 'org.jlleitschuh.gradle:ktlint-gradle:11.0.0'
15+
16+
}
17+
}
18+
19+
plugins {
20+
id 'com.android.application' version '7.3.1' apply false
21+
id 'com.android.library' version '7.3.1' apply false
22+
id 'org.jetbrains.kotlin.android' version '1.8.10' apply false
23+
id 'org.jetbrains.kotlin.plugin.serialization' version '1.8.10' apply false
24+
}
25+
26+
def optInAnnotations = [
27+
"com.amplifyframework.annotations.InternalApiWarning",
28+
"com.amplifyframework.annotations.InternalAmplifyApi"
29+
]
30+
31+
allprojects {
32+
repositories {
33+
google()
34+
mavenCentral()
35+
}
36+
37+
gradle.projectsEvaluated {
38+
tasks.withType(JavaCompile) {
39+
options.compilerArgs << "-Xlint:all" << "-Werror"
40+
}
41+
tasks.withType(Test) {
42+
minHeapSize = '128m'
43+
maxHeapSize = '4g'
44+
}
45+
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
46+
kotlinOptions {
47+
optInAnnotations.each {annotation ->
48+
freeCompilerArgs += "-opt-in=" + annotation
49+
}
50+
}
51+
}
52+
}
53+
}
54+
55+
apply plugin: 'org.jetbrains.dokka'
56+
dokkaHtmlCollector {
57+
outputDirectory = rootProject.buildDir
58+
}
59+
60+
task clean(type: Delete) {
61+
delete rootProject.buildDir
62+
}
63+
64+
ext {
65+
compileSdkVersion = 33
66+
minSdkVersion = 24
67+
targetSdkVersion = 33
68+
amplifyVersion = '2.7.0'
69+
cameraXVersion = '1.2.0'
70+
dependency = [
71+
amplify: [
72+
auth: "com.amplifyframework:aws-api:$amplifyVersion",
73+
predictions: "com.amplifyframework:aws-predictions:$amplifyVersion",
74+
],
75+
androidx: [
76+
camera: [
77+
core: "androidx.camera:camera-core:$cameraXVersion",
78+
camera2: "androidx.camera:camera-camera2:$cameraXVersion",
79+
lifecycle: "androidx.camera:camera-lifecycle:$cameraXVersion",
80+
],
81+
futures: 'androidx.concurrent:concurrent-futures:1.1.0',
82+
material: 'androidx.compose.material3:material3:1.0.1',
83+
uiTooling: 'androidx.compose.ui:ui-tooling:1.3.2',
84+
lifecycle_ktx: 'androidx.lifecycle:lifecycle-runtime-ktx:2.4.0',
85+
],
86+
kotlin: [
87+
stdlib: 'org.jetbrains.kotlin:kotlin-stdlib:1.8.10',
88+
serializationJson: 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.3',
89+
ktlint: 'org.jlleitschuh.gradle:ktlint-gradle:7.1.0',
90+
],
91+
tensorFlow: 'org.tensorflow:tensorflow-lite:2.0.0',
92+
tensorFlowSupport: 'org.tensorflow:tensorflow-lite-support:0.3.0',
93+
test: [
94+
androidx: [
95+
core_ktx: 'androidx.test:core-ktx:1.3.0',
96+
runner: 'androidx.test:runner:1.3.0',
97+
junit: 'androidx.test.ext:junit:1.1.4',
98+
espresso: 'androidx.test.espresso:espresso-core:3.5.0',
99+
],
100+
junit: 'junit:junit:4.13.2',
101+
robolectric: 'org.robolectric:robolectric:4.7',
102+
mockk: 'io.mockk:mockk:1.13.4'
103+
]
104+
]
105+
}
106+
107+
subprojects { project ->
108+
project.group = POM_GROUP
109+
110+
apply plugin: 'org.jlleitschuh.gradle.ktlint'
111+
ktlint {
112+
android.set(true)
113+
}
114+
afterEvaluate {
115+
configureAndroidLibrary(project)
116+
}
117+
if (!project.name.contains("test")) {
118+
apply plugin: 'org.jetbrains.dokka'
119+
dokkaHtml {
120+
dokkaSourceSets {
121+
configureEach {
122+
includeNonPublic.set(false)
123+
skipEmptyPackages.set(true)
124+
skipDeprecated.set(true)
125+
reportUndocumented.set(true)
126+
jdkVersion.set(8)
127+
}
128+
}
129+
}
130+
}
131+
}
132+
133+
private void configureAndroidLibrary(Project project) {
134+
project.ext.VERSION_NAME = project.hasProperty('VERSION_NAME') ?
135+
project.findProperty('VERSION_NAME') :
136+
rootProject.findProperty('VERSION_NAME')
137+
138+
if (project.hasProperty('signingKeyId')) {
139+
System.out.println("Getting signing info from protected source.")
140+
project.ext.'signing.keyId' = findProperty('signingKeyId')
141+
project.ext.'signing.password' = findProperty('signingPassword')
142+
project.ext.'signing.inMemoryKey' = findProperty('signingInMemoryKey')
143+
}
144+
145+
project.android {
146+
//buildToolsVersion rootProject.ext.buildToolsVersion
147+
compileSdkVersion rootProject.ext.compileSdkVersion
148+
149+
defaultConfig {
150+
multiDexEnabled true
151+
minSdkVersion project.findProperty('minSdkVersion')
152+
targetSdkVersion rootProject.ext.targetSdkVersion
153+
versionName project.ext.VERSION_NAME
154+
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
155+
testInstrumentationRunnerArguments clearPackageData: 'true'
156+
consumerProguardFiles rootProject.file('configuration/consumer-rules.pro')
157+
158+
testOptions {
159+
animationsDisabled = true
160+
unitTests {
161+
includeAndroidResources = true
162+
}
163+
}
164+
165+
buildConfigField "String", "VERSION_NAME", "\"${project.ext.VERSION_NAME}\""
166+
}
167+
168+
lintOptions {
169+
warningsAsErrors true
170+
abortOnError true
171+
enable 'UnusedResources'
172+
enable 'NewerVersionAvailable'
173+
}
174+
175+
compileOptions {
176+
sourceCompatibility JavaVersion.VERSION_1_8
177+
targetCompatibility JavaVersion.VERSION_1_8
178+
}
179+
180+
kotlinOptions {
181+
jvmTarget = '1.8'
182+
}
183+
184+
buildFeatures {
185+
mlModelBinding true
186+
compose true
187+
}
188+
189+
composeOptions {
190+
kotlinCompilerExtensionVersion '1.4.3'
191+
}
192+
193+
packagingOptions {
194+
exclude 'META-INF/DEPENDENCIES'
195+
}
196+
}
197+
}

configuration/consumer-rules.pro

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-keepclassmembers enum * { *; }
2+
3+
-keep class com.amplifyframework.** { *; }

configuration/java.header

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
^/\*$
2+
^ \* Copyright \d{4} Amazon\.com, Inc\. or its affiliates\. All Rights Reserved\.$
3+
^ \*$
4+
^ \* Licensed under the Apache License, Version 2\.0 \(the \"License\"\)\.$
5+
^ \* You may not use this file except in compliance with the License\.$
6+
^ \* A copy of the License is located at$
7+
^ \*$
8+
^ \* http://aws\.amazon\.com/apache2\.0$
9+
^ \*$
10+
^ \* or in the \"license\" file accompanying this file\. This file is distributed$
11+
^ \* on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either$
12+
^ \* express or implied\. See the License for the specific language governing$
13+
^ \* permissions and limitations under the License\.$
14+
^ \*/$
15+

0 commit comments

Comments
 (0)