AeThex-OS/android/app/build.gradle
MrPiglr ad5f15271e fix: resolve 55+ TypeScript errors and cleanup codebase
- Create server/auth.ts with requireAuth, optionalAuth, requireAdmin middleware
- Fix os.tsx: add Target/Check imports, fix useLayout->usePlatformLayout, fix achievements types
- Fix game-routes.ts: add all Request/Response types, fix session access
- Fix revenue.ts: org_id -> organization_id
- Fix votes.ts: currentSplit scope, created_by type
- Fix dashboard.ts: remove unsupported .distinct() method
- Fix game-dev-apis.ts: header/body type assertions
- Upgrade api/execute.ts: add Python simulation, JSON validation, HTML/CSS passthrough
- Upgrade app-registry.ts: full implementation with 15 apps, RBAC, categories
- Clean up Java heap error logs
2026-02-03 02:31:34 -07:00

79 lines
3.3 KiB
Groovy

apply plugin: 'com.android.application'
// Task to delete the invalid files I created. This will run before anything else.
task deleteInvalidFiles(type: Delete) {
delete 'src/main/res/drawable/icon.txt'
delete 'src/main/res/drawable/icon.xml'
}
// Make sure this cleanup task runs before the resources are processed.
preBuild.dependsOn deleteInvalidFiles
android {
namespace = "com.aethex.os"
compileSdk = rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "com.aethex.os"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
aaptOptions {
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
// Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
ignoreAssetsPattern = '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
// Task to build the web app before the Android build starts
task buildWebApp(type: Exec) {
workingDir '../../'
if (System.getProperty('os.name').toLowerCase().contains('windows')) {
commandLine 'cmd', '/c', 'npm', 'run', 'build'
} else {
commandLine 'npm', 'run', 'build'
}
environment 'SUPABASE_URL', 'https://kmdeisowhtsalsekkzqd.supabase.co'
environment 'SUPABASE_ANON_KEY', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImttZGVpc293aHRzYWxzZWtrenFkIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTM3Mzc2NTIsImV4cCI6MjA2OTMxMzY1Mn0.2mvk-rDZnHOzdx6Cgcysh51a3cflOlRWO6OA1Z5YWuQ'
}
// Make sure the web app is built before the Android preBuild task
preBuild.dependsOn buildWebApp
repositories {
// flatDir{
// dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
// }
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion"
implementation project(':capacitor-android')
implementation platform('com.google.firebase:firebase-bom:33.6.0')
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.firebase:firebase-messaging'
testImplementation "junit:junit:$junitVersion"
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
// implementation project(':capacitor-cordova-android-plugins')
}
apply from: 'capacitor.build.gradle'
try {
def servicesJSON = file('google-services.json')
if (servicesJSON.text) {
apply plugin: 'com.google.gms.google-services'
}
} catch(Exception e) {
logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
}