-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #183 from stytchauth/jordan/k2
Version updates and testing with K2 enabled
- Loading branch information
Showing
41 changed files
with
922 additions
and
865 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
import java.util.Properties | ||
|
||
buildscript { | ||
dependencies { | ||
classpath(libs.gradle) | ||
classpath(libs.kotlin.gradle.plugin) | ||
classpath(libs.dokka.gradle.plugin) | ||
classpath(libs.versioning.plugin) | ||
// NOTE: Do not place your application dependencies here; they belong | ||
// in the individual module build.gradle files | ||
|
||
constraints { | ||
// Force upgrades of AGP dependencies | ||
classpath(libs.commonsCompress) | ||
classpath(libs.jose4j) | ||
classpath(libs.netty.handler) | ||
classpath(libs.netty.handler.proxy) | ||
classpath(libs.netty.codec.http) | ||
classpath(libs.netty.codec.http2) | ||
classpath(libs.bcpkix.jdk18on) | ||
classpath(libs.jimfs) | ||
classpath(libs.grpcNetty) | ||
classpath(libs.guava) | ||
} | ||
} | ||
} | ||
|
||
plugins { | ||
alias(libs.plugins.nexusPublishPlugin) apply (true) | ||
alias(libs.plugins.ktlint) | ||
alias(libs.plugins.detekt) | ||
alias(libs.plugins.dokka) | ||
alias(libs.plugins.androidLibrary) apply (false) | ||
alias(libs.plugins.androidApplication) apply (false) | ||
alias(libs.plugins.kotlinPluginCompose) apply (false) | ||
alias(libs.plugins.hilt.android) apply (false) | ||
alias(libs.plugins.ksp) apply (false) | ||
} | ||
|
||
apply("$rootDir/scripts/publish-root.gradle") | ||
|
||
subprojects { | ||
tasks.withType<Javadoc>().all { enabled = false } | ||
apply( | ||
plugin = | ||
rootProject.libs.plugins.ktlint | ||
.get() | ||
.pluginId, | ||
) | ||
apply( | ||
plugin = | ||
rootProject.libs.plugins.detekt | ||
.get() | ||
.pluginId, | ||
) | ||
} | ||
|
||
allprojects { | ||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
// Optionally configure plugin | ||
ktlint { | ||
android = true | ||
version = "1.2.1" | ||
} | ||
configurations.all { | ||
resolutionStrategy { | ||
force(rootProject.libs.woodstox) | ||
force(rootProject.libs.grpcNetty) | ||
force(rootProject.libs.guava) | ||
force(rootProject.libs.netty.codec.http) | ||
} | ||
} | ||
} | ||
|
||
tasks.register<Delete>("clean") { | ||
delete(rootProject.layout.buildDirectory) | ||
} | ||
|
||
tasks.register("runOnGitHub") { | ||
dependsOn( | ||
":source:sdk:lint", | ||
":source:sdk:ktlintCheck", | ||
":source:sdk:testDebugUnitTest", | ||
) | ||
group = "custom" | ||
description = "\$ ./gradlew runOnGitHub # runs on GitHub Action" | ||
} | ||
|
||
tasks.dokkaHtmlMultiModule.configure { | ||
outputDirectory.set(file("$projectDir/docs")) | ||
} | ||
|
||
// Create variables with empty default values | ||
extra["STYTCH_PUBLIC_TOKEN"] = "" | ||
extra["GOOGLE_OAUTH_CLIENT_ID"] = "" | ||
extra["STYTCH_B2B_PUBLIC_TOKEN"] = "" | ||
extra["STYTCH_B2B_ORG_ID"] = "" | ||
extra["UI_GOOGLE_CLIENT_ID"] = "" | ||
extra["PASSKEYS_DOMAIN"] = "" | ||
|
||
val localProperties = project.rootProject.file("local.properties") | ||
if (localProperties.exists()) { | ||
val p = Properties() | ||
localProperties.inputStream().use { | ||
p.load(it) | ||
} | ||
p.forEach { name, value -> | ||
extra[name as String] = value as String | ||
} | ||
} else { | ||
// Use envvars | ||
extra["STYTCH_PUBLIC_TOKEN"] = System.getenv("STYTCH_PUBLIC_TOKEN") | ||
extra["GOOGLE_OAUTH_CLIENT_ID"] = System.getenv("GOOGLE_OAUTH_CLIENT_ID") | ||
extra["STYTCH_B2B_PUBLIC_TOKEN"] = System.getenv("STYTCH_B2B_PUBLIC_TOKEN") | ||
extra["STYTCH_B2B_ORG_ID"] = System.getenv("STYTCH_B2B_ORG_ID") | ||
extra["UI_GOOGLE_CLIENT_ID"] = System.getenv("UI_GOOGLE_CLIENT_ID") | ||
extra["PASSKEYS_DOMAIN"] = System.getenv("PASSKEYS_DOMAIN") | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
plugins { | ||
alias(libs.plugins.androidApplication) | ||
} | ||
val publicToken = rootProject.ext["STYTCH_PUBLIC_TOKEN"] as String | ||
|
||
android { | ||
namespace = "com.stytch.javademoapp" | ||
compileSdk = 35 | ||
|
||
defaultConfig { | ||
applicationId = "com.stytch.javademoapp" | ||
minSdk = 24 | ||
targetSdk = 35 | ||
versionCode = 1 | ||
versionName = "1.0" | ||
|
||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
|
||
manifestPlaceholders["stytchOAuthRedirectScheme"] = "stytchjavademoapp" | ||
manifestPlaceholders["stytchOAuthRedirectHost"] = "oauth" | ||
manifestPlaceholders["STYTCH_PUBLIC_TOKEN"] = publicToken | ||
manifestPlaceholders["STYTCH_B2B_PUBLIC_TOKEN"] = "" | ||
|
||
buildConfigField("String", "STYTCH_PUBLIC_TOKEN", "\"$publicToken\"") | ||
} | ||
|
||
buildTypes { | ||
release { | ||
isMinifyEnabled = false | ||
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
} | ||
buildFeatures { | ||
buildConfig = true | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation(project(":source:sdk")) | ||
implementation(libs.appcompat) | ||
implementation(libs.material) | ||
implementation(libs.activity) | ||
implementation(libs.constraintlayout) | ||
implementation(libs.lifecycle.viewmodel) | ||
} |
Oops, something went wrong.