Skip to content

Commit 3cf2d96

Browse files
authored
feat(data): AppSync Events Library Shells (#3009)
1 parent 9f7d6e7 commit 3cf2d96

File tree

14 files changed

+269
-0
lines changed

14 files changed

+269
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/*
2+
* Copyright 2025 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+
16+
import java.util.Properties
17+
18+
plugins {
19+
id("com.android.library")
20+
id("kotlin-android")
21+
}
22+
23+
apply(from = rootProject.file("configuration/publishing.gradle"))
24+
25+
fun readVersion() = Properties().run {
26+
file("../version.properties").inputStream().use { load(it) }
27+
get("VERSION_NAME").toString()
28+
}
29+
30+
project.setProperty("VERSION_NAME", readVersion())
31+
group = properties["POM_GROUP"].toString()
32+
33+
android {
34+
namespace = "com.amplifyframework.aws.appsync.core"
35+
defaultConfig {
36+
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
37+
}
38+
39+
testOptions {
40+
execution = "ANDROIDX_TEST_ORCHESTRATOR"
41+
}
42+
}
43+
44+
dependencies {
45+
46+
api(project(":aws-appsync-core"))
47+
api(project(":core"))
48+
49+
implementation(project(":aws-auth-cognito"))
50+
implementation(project(":aws-core"))
51+
implementation(libs.aws.signing)
52+
53+
testImplementation(libs.test.junit)
54+
testImplementation(libs.test.mockk)
55+
testImplementation(libs.test.kotlin.coroutines)
56+
testImplementation(libs.test.kotest.assertions)
57+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
POM_ARTIFACT_ID=aws-appsync-core-amplify
2+
POM_NAME=AWS AppSync Core for Amplify Android
3+
POM_DESCRIPTION=AWS AppSync Core for Amplify Android Library
4+
POM_PACKAGING=aar
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
/*
2+
* Copyright 2025 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+
16+
import java.util.Properties
17+
18+
plugins {
19+
id("java-library")
20+
id("maven-publish")
21+
alias(libs.plugins.kotlin.jvm)
22+
}
23+
24+
java {
25+
withSourcesJar()
26+
withJavadocJar()
27+
}
28+
29+
kotlin {
30+
jvmToolchain(17)
31+
}
32+
33+
fun readVersion() = Properties().run {
34+
file("../version.properties").inputStream().use { load(it) }
35+
get("VERSION_NAME").toString()
36+
}
37+
38+
project.setProperty("VERSION_NAME", readVersion())
39+
40+
apply(from = rootProject.file("configuration/publishing.gradle"))
41+
42+
val packageInfoGenerator by tasks.registering {
43+
val constantsDir = project.layout.buildDirectory.dir("generated/sources/constants/java")
44+
val outputFile = constantsDir.get().file("com/amplifyframework/aws/appsync/core/util/PackageInfo.kt").asFile
45+
inputs.property("version", version)
46+
outputs.dir(constantsDir)
47+
doLast {
48+
outputFile.parentFile.mkdirs()
49+
val properties = inputs.properties
50+
val version by properties
51+
outputFile.writeText(
52+
"""package com.amplifyframework.aws.appsync.core.util
53+
|
54+
|internal object PackageInfo {
55+
| const val version = "$version"
56+
|}
57+
|
58+
""".trimMargin()
59+
)
60+
}
61+
}
62+
63+
sourceSets.main {
64+
java.srcDir(packageInfoGenerator)
65+
}
66+
67+
dependencies {
68+
69+
testImplementation(libs.test.junit)
70+
testImplementation(libs.test.mockk)
71+
testImplementation(libs.test.kotlin.coroutines)
72+
testImplementation(libs.test.kotest.assertions)
73+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
POM_ARTIFACT_ID=aws-appsync-core
2+
POM_NAME=AWS AppSync Core for Android
3+
POM_DESCRIPTION=AWS AppSync Core for Android
4+
POM_PACKAGING=jar
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/*
2+
* Copyright 2025 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+
16+
import java.util.Properties
17+
18+
plugins {
19+
id("com.android.library")
20+
id("kotlin-android")
21+
}
22+
23+
apply(from = rootProject.file("configuration/publishing.gradle"))
24+
25+
fun readVersion() = Properties().run {
26+
file("../version.properties").inputStream().use { load(it) }
27+
get("VERSION_NAME").toString()
28+
}
29+
30+
project.setProperty("VERSION_NAME", readVersion())
31+
group = properties["POM_GROUP"].toString()
32+
33+
android {
34+
namespace = "com.amplifyframework.aws.appsync.events.amplify"
35+
defaultConfig {
36+
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
37+
}
38+
39+
testOptions {
40+
execution = "ANDROIDX_TEST_ORCHESTRATOR"
41+
}
42+
}
43+
44+
dependencies {
45+
api(project(":aws-appsync-events"))
46+
47+
testImplementation(libs.test.junit)
48+
testImplementation(libs.test.mockk)
49+
testImplementation(libs.test.kotlin.coroutines)
50+
testImplementation(libs.test.kotest.assertions)
51+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
POM_ARTIFACT_ID=aws-appsync-events-amplify
2+
POM_NAME=AWS AppSync Events for Amplify Android
3+
POM_DESCRIPTION=AWS AppSync Events Library for Amplify Android
4+
POM_PACKAGING=aar
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

0 commit comments

Comments
 (0)