Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe2ab588 authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

Merge branch '3941-master-updatea16' into 'master'

Update pwa player for a16

See merge request !5
parents 5c536cff 9805d60d
Loading
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
image: "registry.gitlab.e.foundation/e/os/docker-android-apps-cicd:java21"
image: "registry.gitlab.e.foundation/e/os/docker-android-apps-cicd:latest"

stages:
- build

before_script:
  - export JAVA_HOME=/usr/lib/jvm/java-25-openjdk-amd64
  - export GRADLE_USER_HOME=$(pwd)/.gradle
  - chmod +x ./gradlew

app/build.gradle

deleted100644 → 0
+0 −82
Original line number Diff line number Diff line
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'com.google.devtools.ksp'

// Manifest version information!
def versionMajor = 1
def versionMinor = 0
def versionPatch = 0

android {
    compileSdk 35

    defaultConfig {
        applicationId "foundation.e.pwaplayer"
        minSdk 24
        targetSdk 35
        versionCode versionMajor * 10000 + versionMinor * 1000 + versionPatch * 100
        versionName "${versionMajor}.${versionMinor}.${versionPatch}"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    signingConfigs {
        platform {
            storeFile = file("${rootDir.path}/keystore/platform.jks")
            storePassword = "platform"
            keyAlias = "platform"
            keyPassword = "platform"
        }
    }

    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }

        debug {
            minifyEnabled = false
            signingConfig = signingConfigs.platform
        }
    }

    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_21
        targetCompatibility = JavaVersion.VERSION_21
    }

    kotlinOptions {
        jvmTarget = "21"
    }

    buildFeatures {
        buildConfig = true
    }

    viewBinding {
        enabled = true
    }

    namespace = "foundation.e.pwaplayer"
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'androidx.core:core-ktx:1.15.0'

    implementation "androidx.appcompat:appcompat:1.7.0"
    implementation "androidx.recyclerview:recyclerview:1.4.0"
    implementation "androidx.coordinatorlayout:coordinatorlayout:1.3.0"
    implementation "androidx.preference:preference-ktx:1.2.1"

    def room_version = "2.6.1"
    implementation "androidx.room:room-runtime:$room_version"
    ksp "androidx.room:room-compiler:$room_version"

    implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test:core:1.6.1'
    androidTestImplementation 'androidx.test.ext:junit:1.2.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
}
 No newline at end of file

app/build.gradle.kts

0 → 100644
+89 −0
Original line number Diff line number Diff line
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
    alias(libs.plugins.android.application)
    alias(libs.plugins.androidx.room)
    alias(libs.plugins.kotlin.android)
    alias(libs.plugins.ksp)
}

// Manifest version information!
val versionMajor = 1
val versionMinor = 1
val versionPatch = 0

android {
    namespace = "foundation.e.pwaplayer"
    compileSdk = 36

    defaultConfig {
        applicationId = "foundation.e.pwaplayer"
        minSdk = 24
        targetSdk = 36
        versionCode = versionMajor * 10000 + versionMinor * 1000 + versionPatch * 100
        versionName = "${versionMajor}.${versionMinor}.${versionPatch}"

        testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
    }

    signingConfigs {
        create("platform") {
            storeFile = file("${rootDir.path}/keystore/platform.jks")
            storePassword = "platform"
            keyAlias = "platform"
            keyPassword = "platform"
        }
    }

    buildTypes {
        release {
            isMinifyEnabled = true
            isShrinkResources = true
            signingConfig = signingConfigs.getByName("platform")
            proguardFiles(
                getDefaultProguardFile("proguard-android-optimize.txt"),
                "proguard-rules.pro"
            )
        }

        debug {
            isMinifyEnabled = false
            signingConfig = signingConfigs.getByName("platform")
        }
    }

    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_25
        targetCompatibility = JavaVersion.VERSION_25
    }

    kotlin { compilerOptions { jvmTarget = JvmTarget.JVM_25 } }

    buildFeatures {
        buildConfig = true
        viewBinding = true
    }

    room {
        schemaDirectory("$projectDir/schemas")
    }
}

dependencies {
    implementation(libs.kotlin.stdlib)
    implementation(libs.androidx.core.ktx)

    implementation(libs.androidx.appcompat)
    implementation(libs.androidx.recyclerview)
    implementation(libs.androidx.coordinatorlayout)
    implementation(libs.androidx.preference.ktx)

    implementation(libs.androidx.room.runtime)
    ksp(libs.androidx.room.compiler)

    implementation(libs.androidx.constraintlayout)
    testImplementation(libs.junit)
    androidTestImplementation(libs.androidx.test.core)
    androidTestImplementation(libs.androidx.test.ext.junit)
    androidTestImplementation(libs.androidx.test.espresso.core)
}
+66 −0
Original line number Diff line number Diff line
{
  "formatVersion": 1,
  "database": {
    "version": 2,
    "identityHash": "d69e1dfdf2d0d3de32720f02cded727a",
    "entities": [
      {
        "tableName": "pwa",
        "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `shortcutId` TEXT NOT NULL, `url` TEXT NOT NULL, `title` TEXT NOT NULL, `icon` BLOB NOT NULL)",
        "fields": [
          {
            "fieldPath": "id",
            "columnName": "_id",
            "affinity": "INTEGER",
            "notNull": true
          },
          {
            "fieldPath": "shortcutId",
            "columnName": "shortcutId",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "url",
            "columnName": "url",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "title",
            "columnName": "title",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "iconBlob",
            "columnName": "icon",
            "affinity": "BLOB",
            "notNull": true
          }
        ],
        "primaryKey": {
          "autoGenerate": true,
          "columnNames": [
            "_id"
          ]
        },
        "indices": [
          {
            "name": "index_pwa_shortcutId",
            "unique": true,
            "columnNames": [
              "shortcutId"
            ],
            "orders": [],
            "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_pwa_shortcutId` ON `${TABLE_NAME}` (`shortcutId`)"
          }
        ]
      }
    ],
    "setupQueries": [
      "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
      "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'd69e1dfdf2d0d3de32720f02cded727a')"
    ]
  }
}
 No newline at end of file
+19 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
    <application>

        <activity
            android:name=".ui.about.AboutActivity"
            android:parentActivityName=".ui.home.HomeActivity" />

        <activity android:name=".ui.home.HomeActivity"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>
 No newline at end of file
Loading