Skip to content

Commit

Permalink
fix build gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
frontegg-david committed Nov 23, 2023
1 parent e575041 commit 16e924a
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 67 deletions.
27 changes: 0 additions & 27 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -109,30 +109,3 @@ afterEvaluate {
}
}

// Define the modifyManifest function
ext.modifyManifest = { param1, param2 ->
// Task to modify the manifest
def manifestFile = android.sourceSets.main.manifest.srcFile
def parsedXml = new XmlParser().parse(manifestFile)


print("Params, ${param1} , ${param2}")
}

//ext {
// modifyManifest = { param1, param2 ->
// // Task to modify the manifest
// doLast {
// def manifestFile = android.sourceSets.main.manifest.srcFile
// def parsedXml = new XmlParser().parse(manifestFile)
//
// // Example of modification based on parameters
// if (param1) {
// parsedXml.application[0].activity[0].@android:name = param2
// }
//
// // Save the modified XML back to the manifest file
// new XmlNodePrinter(new PrintWriter(manifestFile)).print(parsedXml)
// }
// }
//}
23 changes: 7 additions & 16 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,13 @@
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data android:scheme="https"/>
<data android:host="${frontegg_domain}"/>
<data android:pathPrefix="/oauth/account/activate"/>
<data android:scheme="https"/>
<data android:host="${frontegg_domain}"/>
<data android:pathPrefix="/oauth/account/invitation/accept"/>
<data android:scheme="https"/>
<data android:host="${frontegg_domain}"/>
<data android:pathPrefix="/oauth/account/reset-password"/>
<data android:scheme="https"/>
<data android:host="${frontegg_domain}"/>
<data android:pathPrefix="/oauth/account/social/success"/>
<data android:scheme="https"/>
<data android:host="${frontegg_domain}"/>
<data android:pathPrefix="/oauth/account/login/magic-link"/>

<data android:scheme="https" />
<data android:host="${frontegg_domain}" />
<data android:pathPrefix="/oauth/account/activate" />
<data android:pathPrefix="/oauth/account/invitation/accept" />
<data android:pathPrefix="/oauth/account/reset-password" />
<data android:pathPrefix="/oauth/account/social/success" />
<data android:pathPrefix="/oauth/account/login/magic-link" />
</intent-filter>
</activity>

Expand Down
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ plugins {
id 'com.android.library' version '7.4.2' apply false
id 'org.jetbrains.kotlin.android' version '1.9.10' apply false
}


ext {
kotlinVersion = "1.7.10"
buildToolsVersion = "32.0.0"
Expand Down
30 changes: 6 additions & 24 deletions multi-region/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,28 @@ plugins {
def fronteggDomain = "auth.davidantoon.me"
def fronteggClientId = "b6adfe4c-d695-4c04-b95f-3ec9fd0c6cca"


android {
namespace 'com.frontegg.demo'
compileSdk 34

defaultConfig {
applicationId "com.frontegg.demo"
minSdk 26
targetSdk 33
targetSdk 34
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary true
}


manifestPlaceholders = [
"package_name" : applicationId,
"frontegg_domain" : fronteggDomain,
"package_name" : applicationId,
"frontegg_domain" : fronteggDomain,
"frontegg_client_id": fronteggClientId
]

buildConfigField "String", 'FRONTEGG_DOMAIN', "\"$fronteggDomain\""
buildConfigField "String", 'FRONTEGG_CLIENT_ID', "\"$fronteggClientId\""

}

buildTypes {
Expand All @@ -49,29 +45,15 @@ android {
jvmTarget = '1.8'
}
buildFeatures {
compose true
viewBinding true
}
composeOptions {
kotlinCompilerExtensionVersion '1.4.3'
}
packagingOptions {
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
}
}
buildToolsVersion buildToolsVersion

}

//
//tasks.register('hello') {
// doLast {
// modifyManifest("asdasd")
// }
//}
}

dependencies {

implementation 'androidx.core:core-ktx:1.10.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'io.reactivex.rxjava3:rxkotlin:3.0.1'
Expand Down
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ include ':android'
include ':app'
include ':embedded'
include ':multi-region'

0 comments on commit 16e924a

Please sign in to comment.