Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions appsync/aws-appsync-core-amplify/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
57 changes: 57 additions & 0 deletions appsync/aws-appsync-core-amplify/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/

import java.util.Properties

plugins {
id("com.android.library")
id("kotlin-android")
}

apply(from = rootProject.file("configuration/publishing.gradle"))

fun readVersion() = Properties().run {
file("../version.properties").inputStream().use { load(it) }
get("VERSION_NAME").toString()
}

project.setProperty("VERSION_NAME", readVersion())
group = properties["POM_GROUP"].toString()

android {
namespace = "com.amplifyframework.aws.appsync.core"
defaultConfig {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

testOptions {
execution = "ANDROIDX_TEST_ORCHESTRATOR"
}
}

dependencies {

api(project(":aws-appsync-core"))
api(project(":core"))

implementation(project(":aws-auth-cognito"))
implementation(project(":aws-core"))
implementation(libs.aws.signing)

testImplementation(libs.test.junit)
testImplementation(libs.test.mockk)
testImplementation(libs.test.kotlin.coroutines)
testImplementation(libs.test.kotest.assertions)
}
4 changes: 4 additions & 0 deletions appsync/aws-appsync-core-amplify/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
POM_ARTIFACT_ID=aws-appsync-core-amplify
POM_NAME=AWS AppSync Core for Amplify Android
POM_DESCRIPTION=AWS AppSync Core for Amplify Android Library
POM_PACKAGING=aar
1 change: 1 addition & 0 deletions appsync/aws-appsync-core/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
73 changes: 73 additions & 0 deletions appsync/aws-appsync-core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/*
* Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/

import java.util.Properties

plugins {
id("java-library")
id("maven-publish")
alias(libs.plugins.kotlin.jvm)
}

java {
withSourcesJar()
withJavadocJar()
}

kotlin {
jvmToolchain(17)
}

fun readVersion() = Properties().run {
file("../version.properties").inputStream().use { load(it) }
get("VERSION_NAME").toString()
}

project.setProperty("VERSION_NAME", readVersion())

apply(from = rootProject.file("configuration/publishing.gradle"))

val packageInfoGenerator by tasks.registering {
val constantsDir = project.layout.buildDirectory.dir("generated/sources/constants/java")
val outputFile = constantsDir.get().file("com/amplifyframework/aws/appsync/core/util/PackageInfo.kt").asFile
inputs.property("version", version)
outputs.dir(constantsDir)
doLast {
outputFile.parentFile.mkdirs()
val properties = inputs.properties
val version by properties
outputFile.writeText(
"""package com.amplifyframework.aws.appsync.core.util
|
|internal object PackageInfo {
| const val version = "$version"
|}
|
""".trimMargin()
)
}
}

sourceSets.main {
java.srcDir(packageInfoGenerator)
}

dependencies {

testImplementation(libs.test.junit)
testImplementation(libs.test.mockk)
testImplementation(libs.test.kotlin.coroutines)
testImplementation(libs.test.kotest.assertions)
}
4 changes: 4 additions & 0 deletions appsync/aws-appsync-core/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
POM_ARTIFACT_ID=aws-appsync-core
POM_NAME=AWS AppSync Core for Android
POM_DESCRIPTION=AWS AppSync Core for Android
POM_PACKAGING=jar
1 change: 1 addition & 0 deletions appsync/aws-appsync-events-amplify/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
51 changes: 51 additions & 0 deletions appsync/aws-appsync-events-amplify/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
* Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/

import java.util.Properties

plugins {
id("com.android.library")
id("kotlin-android")
}

apply(from = rootProject.file("configuration/publishing.gradle"))

fun readVersion() = Properties().run {
file("../version.properties").inputStream().use { load(it) }
get("VERSION_NAME").toString()
}

project.setProperty("VERSION_NAME", readVersion())
group = properties["POM_GROUP"].toString()

android {
namespace = "com.amplifyframework.aws.appsync.events"
defaultConfig {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

testOptions {
execution = "ANDROIDX_TEST_ORCHESTRATOR"
}
}

dependencies {
api(project(":aws-appsync-events"))

testImplementation(libs.test.junit)
testImplementation(libs.test.mockk)
testImplementation(libs.test.kotlin.coroutines)
testImplementation(libs.test.kotest.assertions)
}
4 changes: 4 additions & 0 deletions appsync/aws-appsync-events-amplify/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
POM_ARTIFACT_ID=aws-appsync-events-amplify
POM_NAME=AWS AppSync Events for Amplify Android
POM_DESCRIPTION=AWS AppSync Events Library for Amplify Android
POM_PACKAGING=aar
1 change: 1 addition & 0 deletions appsync/aws-appsync-events/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
56 changes: 56 additions & 0 deletions appsync/aws-appsync-events/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*
* Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/

import java.util.Properties

plugins {
id("com.android.library")
id("kotlin-android")
id("org.jetbrains.kotlin.plugin.serialization")
}

apply(from = rootProject.file("configuration/publishing.gradle"))

fun readVersion() = Properties().run {
file("../version.properties").inputStream().use { load(it) }
get("VERSION_NAME").toString()
}

project.setProperty("VERSION_NAME", readVersion())
group = properties["POM_GROUP"].toString()

android {
namespace = "com.amplifyframework.aws.appsync.events"
defaultConfig {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

testOptions {
execution = "ANDROIDX_TEST_ORCHESTRATOR"
}
}

dependencies {
api(project(":aws-appsync-core"))

implementation(libs.okhttp)
implementation(libs.kotlin.serializationJson)
implementation(libs.kotlin.coroutines)

testImplementation(libs.test.junit)
testImplementation(libs.test.mockk)
testImplementation(libs.test.kotlin.coroutines)
testImplementation(libs.test.kotest.assertions)
}
4 changes: 4 additions & 0 deletions appsync/aws-appsync-events/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
POM_ARTIFACT_ID=aws-appsync-events
POM_NAME=AWS AppSync Events for Android
POM_DESCRIPTION=AWS AppSync Events Library for Android
POM_PACKAGING=aar
1 change: 1 addition & 0 deletions appsync/version.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VERSION_NAME=1.0.0
11 changes: 11 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,17 @@ include(":aws-pinpoint-core")
include(":aws-push-notifications-pinpoint-common")
include(":aws-logging-cloudwatch")

// Events API
include(":aws-appsync-core")
include(":aws-appsync-core-amplify")
include(":aws-appsync-events")
include(":aws-appsync-events-amplify")
project(":aws-appsync-core").projectDir = file("appsync/aws-appsync-core")
project(":aws-appsync-core-amplify").projectDir = file("appsync/aws-appsync-core-amplify")
project(":aws-appsync-events").projectDir = file("appsync/aws-appsync-events")
project(":aws-appsync-events-amplify").projectDir = file("appsync/aws-appsync-events-amplify")


// Apollo Extensions
include(":apollo-appsync")
include(":apollo-appsync-amplify")
Expand Down