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

Commit 05775c58 authored by Yein Jo's avatar Yein Jo
Browse files

Copy Torus library to frameworks/libs/systemui/toruslib.

- A module that depends on Filament is not copied as it's not used for
now.
- Missing license headers were added to a few files.
- SigningConfig is removed.

Bug: 290939683
Test: mmm, gradle
Change-Id: If37f332b7b0a3b7ed608a1133519ca80b591850b
parent 87d01e72
Loading
Loading
Loading
Loading

toruslib/Android.bp

0 → 100644
+52 −0
Original line number Diff line number Diff line
// Copyright (C) 2023 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License 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.

package {
    default_applicable_licenses: [
        "Android-Apache-2.0",
    ],
}

android_library {
    name: "toruslib",
    srcs: [
        "torus-core/src/**/*.java",
        "torus-core/src/**/*.kt",
        "torus-framework-canvas/**/*.java",
        "torus-framework-canvas/**/*.kt",
        "torus-math/src/**/*.java",
        "torus-math/src/**/*.kt",
        "torus-utils/src/**/*.java",
        "torus-utils/src/**/*.kt",
        "torus-wallpaper-settings/src/**/*.java",
        "torus-wallpaper-settings/src/**/*.kt",
    ],
    static_libs: [
        "androidx.slice_slice-core",
        "androidx.slice_slice-builders",
        "androidx.core_core-ktx",
        "androidx.appcompat_appcompat",
    ],
    resource_dirs: [
        "torus-wallpaper-settings/src/main/res",
    ],
    asset_dirs: [
    ],
    manifest: "lib-torus/src/main/AndroidManifest.xml",
    optimize: {
        enabled: true,
    },
    sdk_version: "system_current",
}

toruslib/OWNERS

0 → 100644
+4 −0
Original line number Diff line number Diff line
yeinj@google.com
michelcomin@google.com
shanh@google.com
dupin@google.com
 No newline at end of file

toruslib/build.gradle

0 → 100644
+90 −0
Original line number Diff line number Diff line
// Copyright (C) 2023 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License 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.

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    ext.versions = [
            'minSdk'     : 31,
            'targetSdk'  : 34,
            'compileSdk' : 34,
            'buildTools' : '29.0.3',
            'kotlin'     : '1.6.21',
            'ktx'        : '1.5.0-beta02',
            'material'   : '1.2.1',
            'appcompat'  : '1.3.0',
            'androidXLib': '1.1.0-alpha02'
    ]

    repositories {
        google()
        mavenCentral()
    }

    dependencies {
        classpath "com.android.tools.build:gradle:7.4.2"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$versions.kotlin"
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
    }
}

subprojects {
    if (name.startsWith("torus")) {
        version = VERSION_NAME
        group = GROUP

        apply plugin: 'com.android.library'
        apply plugin: 'kotlin-android'

        android {
            compileSdkVersion versions.compileSdk
            buildToolsVersion versions.buildTools

            defaultConfig {
                minSdkVersion versions.minSdk
                targetSdkVersion versions.targetSdk
            }

            buildTypes {
                release {
                    minifyEnabled false
                    consumerProguardFiles 'lib-proguard-rules.txt'
                }
            }
            compileOptions {
                sourceCompatibility JavaVersion.VERSION_1_8
                targetCompatibility JavaVersion.VERSION_1_8
            }

            kotlinOptions {
                jvmTarget = '1.8'
            }
        }

        dependencies {
            implementation "org.jetbrains.kotlin:kotlin-stdlib:$versions.kotlin"
            implementation "androidx.core:core-ktx:$versions.ktx"
            implementation "androidx.appcompat:appcompat:$versions.appcompat"
        }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
+24 −0
Original line number Diff line number Diff line
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official

VERSION_NAME=1.1.5
GROUP=com.google.android.libraries.graphics.torus
 No newline at end of file
+64 −0
Original line number Diff line number Diff line
// Copyright (C) 2023 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License 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.

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
    compileSdkVersion versions.compileSdk
    buildToolsVersion versions.buildTools

    defaultConfig {
        minSdkVersion versions.minSdk
        targetSdkVersion versions.targetSdk
    }

    buildTypes {
        release {
            minifyEnabled true
            consumerProguardFiles 'lib-proguard-rules.txt'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = '1.8'
    }

    sourceSets {
        main {
            java.srcDirs += '../torus-core/src/main/java'
            java.srcDirs += '../torus-framework-canvas/src/main/java'
            java.srcDirs += '../torus-math/src/main/java'
            java.srcDirs += '../torus-utils/src/main/java'
            java.srcDirs += '../torus-wallpaper-settings/src/main/java'
            java.srcDirs += '../torus-wallpaper-settings/src/main/gen'

            res.srcDirs += '../torus-wallpaper-settings/src/main/res'
        }
    }
}

dependencies {
    implementation "androidx.appcompat:appcompat:$versions.appcompat"

    implementation "org.jetbrains.kotlin:kotlin-stdlib:$versions.kotlin"

    implementation "androidx.core:core-ktx:$versions.ktx"
    implementation "androidx.slice:slice-builders:$versions.androidXLib"
    implementation "androidx.slice:slice-core:$versions.androidXLib"
}
Loading