Loading weathereffects/Android.bp +32 −32 Original line number Diff line number Diff line Loading @@ -16,47 +16,26 @@ package { default_applicable_licenses: ["Android-Apache-2.0"], } // The weather effects library only contains rendering logic. android_library { name: "WeatherEffectsLib", manifest: "AndroidManifest.xml", name: "WeatherEffectsGraphicsLib", sdk_version: "system_current", // min_sdk version must be specified to not compile against platform apis. // Using HardwareBufferRenderer requires minimum of 34. min_sdk_version: "34", static_libs: [ "androidx.slice_slice-core", "androidx.slice_slice-builders", "dagger2", "jsr330", // Dagger inject annotations. "kotlinx_coroutines_android", "kotlinx_coroutines", "androidx.core_core-ktx", // Do not add Torus dependency here, since this package is only for rendering. The host app // will include Torus or Livewallpaper frameworks. "androidx.appcompat_appcompat", "androidx-constraintlayout_constraintlayout", "toruslib", ], srcs: [ "src/**/*.java", "src/**/*.kt", // TODO(b/300991599): Split out debug source. "debug/src/**/*.java", "debug/src/**/*.kt" ], resource_dirs: [ "res", // TODO(b/300991599): Split out debug resources. "debug/res" ], // TODO(b/300991599): Split out debug resources. asset_dirs: [ "debug/assets" "graphics/src/**/*.java", "graphics/src/**/*.kt", ], javacflags: ["-Adagger.fastInit=enabled"], kotlincflags: ["-Xjvm-default=all"], plugins: ["dagger2-compiler"], dxflags: ["--multi-dex"], // This library is meant to access only public APIs, do not flip this flag to true. platform_apis: false } // Debug app. Loading @@ -64,11 +43,33 @@ android_app { name: "WeatherEffectsDebug", manifest: "debug/AndroidManifest.xml", owner: "google", privileged: false, sdk_version: "system_current", min_sdk_version: "34", srcs: [ "src/**/*.java", "src/**/*.kt", "debug/src/**/*.java", "debug/src/**/*.kt", ], resource_dirs: [ "res", "debug/res", ], asset_dirs: [ "debug/assets", ], static_libs: [ "WeatherEffectsLib" "androidx.slice_slice-core", "androidx.slice_slice-builders", "dagger2", "jsr330", // Dagger inject annotations. "kotlinx_coroutines_android", "kotlinx_coroutines", "androidx.core_core-ktx", "androidx.appcompat_appcompat", "androidx-constraintlayout_constraintlayout", "toruslib", "WeatherEffectsGraphicsLib", ], use_embedded_native_libs: true, plugins: ["dagger2-compiler"], Loading @@ -90,13 +91,12 @@ android_test { "tests/src/**/*.kt", ], static_libs: [ "WeatherEffectsLib", "WeatherEffectsGraphicsLib", "androidx.test.rules", "androidx.test.ext.junit", "androidx.test.core", "androidx.test.runner", "kotlinx_coroutines_test", "truth" "truth", ], } weathereffects/AndroidManifest.xml +0 −34 Original line number Diff line number Diff line Loading @@ -16,38 +16,4 @@ --> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.google.android.wallpaper.weathereffects"> <!--TODO: Add privileged permission--> <uses-feature android:name="android.software.live_wallpaper" android:required="true" /> <queries> <package android:name="com.google.android.apps.wallpaper" /> <package android:name="com.android.wallpaper" /> </queries> <application android:icon="@mipmap/ic_launcher" android:label="@string/app_name"> <provider android:name="com.google.android.wallpaper.weathereffects.provider.WeatherEffectsContentProvider" android:authorities="${applicationId}.effectprovider" android:exported="true" /> <service android:name="com.google.android.wallpaper.weathereffects.WeatherWallpaperService" android:directBootAware="true" android:exported="true" android:label="@string/app_name" android:permission="android.permission.BIND_WALLPAPER"> <intent-filter> <action android:name="android.service.wallpaper.WallpaperService" /> </intent-filter> <meta-data android:name="android.service.wallpaper" android:resource="@xml/weather_wallpaper" /> </service> </application> </manifest> weathereffects/build.gradle +1 −0 Original line number Diff line number Diff line Loading @@ -128,6 +128,7 @@ android { dependencies { implementation project(':toruslib') implementation project(':graphics') implementation "androidx.slice:slice-builders:$versions.androidXLib" implementation "androidx.slice:slice-core:$versions.androidXLib" Loading weathereffects/debug/AndroidManifest.xml +28 −2 Original line number Diff line number Diff line Loading @@ -15,13 +15,39 @@ limitations under the License. --> <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.google.android.wallpaper.weathereffects"> <uses-permission android:name="android.permission.READ_MEDIA_IMAGES" /> <uses-feature android:name="android.software.live_wallpaper" android:required="true" /> <queries> <package android:name="com.google.android.apps.wallpaper" /> <package android:name="com.android.wallpaper" /> </queries> <application android:name=".WallpaperEffectsDebugApplication" tools:replace="android:name"> android:icon="@mipmap/ic_launcher"> <provider android:name="com.google.android.wallpaper.weathereffects.provider.WeatherEffectsContentProvider" android:authorities="${applicationId}.effectprovider" android:exported="true" /> <service android:name="com.google.android.wallpaper.weathereffects.WeatherWallpaperService" android:directBootAware="true" android:exported="true" android:label="@string/app_name" android:permission="android.permission.BIND_WALLPAPER"> <intent-filter> <action android:name="android.service.wallpaper.WallpaperService" /> </intent-filter> <meta-data android:name="android.service.wallpaper" android:resource="@xml/weather_wallpaper" /> </service> <activity android:name=".WallpaperEffectsDebugActivity" android:configChanges="uiMode" Loading weathereffects/graphics/build.gradle 0 → 100644 +50 −0 Original line number Diff line number Diff line plugins { id 'com.android.library' id 'org.jetbrains.kotlin.android' } android { namespace 'com.google.android.wallpaper.weathereffects.graphics' compileSdk 34 defaultConfig { minSdk 34 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles "consumer-rules.pro" } sourceSets { main { java.srcDirs = ["${rootDir}/graphics/src"] } } buildTypes { debug { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' testCoverageEnabled true } release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' testCoverageEnabled true } } compileOptions { sourceCompatibility JavaVersion.VERSION_17 targetCompatibility JavaVersion.VERSION_17 } kotlinOptions { jvmTarget = '17' } } dependencies { implementation 'androidx.core:core-ktx:1.12.0' implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'com.google.android.material:material:1.11.0' } No newline at end of file Loading
weathereffects/Android.bp +32 −32 Original line number Diff line number Diff line Loading @@ -16,47 +16,26 @@ package { default_applicable_licenses: ["Android-Apache-2.0"], } // The weather effects library only contains rendering logic. android_library { name: "WeatherEffectsLib", manifest: "AndroidManifest.xml", name: "WeatherEffectsGraphicsLib", sdk_version: "system_current", // min_sdk version must be specified to not compile against platform apis. // Using HardwareBufferRenderer requires minimum of 34. min_sdk_version: "34", static_libs: [ "androidx.slice_slice-core", "androidx.slice_slice-builders", "dagger2", "jsr330", // Dagger inject annotations. "kotlinx_coroutines_android", "kotlinx_coroutines", "androidx.core_core-ktx", // Do not add Torus dependency here, since this package is only for rendering. The host app // will include Torus or Livewallpaper frameworks. "androidx.appcompat_appcompat", "androidx-constraintlayout_constraintlayout", "toruslib", ], srcs: [ "src/**/*.java", "src/**/*.kt", // TODO(b/300991599): Split out debug source. "debug/src/**/*.java", "debug/src/**/*.kt" ], resource_dirs: [ "res", // TODO(b/300991599): Split out debug resources. "debug/res" ], // TODO(b/300991599): Split out debug resources. asset_dirs: [ "debug/assets" "graphics/src/**/*.java", "graphics/src/**/*.kt", ], javacflags: ["-Adagger.fastInit=enabled"], kotlincflags: ["-Xjvm-default=all"], plugins: ["dagger2-compiler"], dxflags: ["--multi-dex"], // This library is meant to access only public APIs, do not flip this flag to true. platform_apis: false } // Debug app. Loading @@ -64,11 +43,33 @@ android_app { name: "WeatherEffectsDebug", manifest: "debug/AndroidManifest.xml", owner: "google", privileged: false, sdk_version: "system_current", min_sdk_version: "34", srcs: [ "src/**/*.java", "src/**/*.kt", "debug/src/**/*.java", "debug/src/**/*.kt", ], resource_dirs: [ "res", "debug/res", ], asset_dirs: [ "debug/assets", ], static_libs: [ "WeatherEffectsLib" "androidx.slice_slice-core", "androidx.slice_slice-builders", "dagger2", "jsr330", // Dagger inject annotations. "kotlinx_coroutines_android", "kotlinx_coroutines", "androidx.core_core-ktx", "androidx.appcompat_appcompat", "androidx-constraintlayout_constraintlayout", "toruslib", "WeatherEffectsGraphicsLib", ], use_embedded_native_libs: true, plugins: ["dagger2-compiler"], Loading @@ -90,13 +91,12 @@ android_test { "tests/src/**/*.kt", ], static_libs: [ "WeatherEffectsLib", "WeatherEffectsGraphicsLib", "androidx.test.rules", "androidx.test.ext.junit", "androidx.test.core", "androidx.test.runner", "kotlinx_coroutines_test", "truth" "truth", ], }
weathereffects/AndroidManifest.xml +0 −34 Original line number Diff line number Diff line Loading @@ -16,38 +16,4 @@ --> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.google.android.wallpaper.weathereffects"> <!--TODO: Add privileged permission--> <uses-feature android:name="android.software.live_wallpaper" android:required="true" /> <queries> <package android:name="com.google.android.apps.wallpaper" /> <package android:name="com.android.wallpaper" /> </queries> <application android:icon="@mipmap/ic_launcher" android:label="@string/app_name"> <provider android:name="com.google.android.wallpaper.weathereffects.provider.WeatherEffectsContentProvider" android:authorities="${applicationId}.effectprovider" android:exported="true" /> <service android:name="com.google.android.wallpaper.weathereffects.WeatherWallpaperService" android:directBootAware="true" android:exported="true" android:label="@string/app_name" android:permission="android.permission.BIND_WALLPAPER"> <intent-filter> <action android:name="android.service.wallpaper.WallpaperService" /> </intent-filter> <meta-data android:name="android.service.wallpaper" android:resource="@xml/weather_wallpaper" /> </service> </application> </manifest>
weathereffects/build.gradle +1 −0 Original line number Diff line number Diff line Loading @@ -128,6 +128,7 @@ android { dependencies { implementation project(':toruslib') implementation project(':graphics') implementation "androidx.slice:slice-builders:$versions.androidXLib" implementation "androidx.slice:slice-core:$versions.androidXLib" Loading
weathereffects/debug/AndroidManifest.xml +28 −2 Original line number Diff line number Diff line Loading @@ -15,13 +15,39 @@ limitations under the License. --> <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.google.android.wallpaper.weathereffects"> <uses-permission android:name="android.permission.READ_MEDIA_IMAGES" /> <uses-feature android:name="android.software.live_wallpaper" android:required="true" /> <queries> <package android:name="com.google.android.apps.wallpaper" /> <package android:name="com.android.wallpaper" /> </queries> <application android:name=".WallpaperEffectsDebugApplication" tools:replace="android:name"> android:icon="@mipmap/ic_launcher"> <provider android:name="com.google.android.wallpaper.weathereffects.provider.WeatherEffectsContentProvider" android:authorities="${applicationId}.effectprovider" android:exported="true" /> <service android:name="com.google.android.wallpaper.weathereffects.WeatherWallpaperService" android:directBootAware="true" android:exported="true" android:label="@string/app_name" android:permission="android.permission.BIND_WALLPAPER"> <intent-filter> <action android:name="android.service.wallpaper.WallpaperService" /> </intent-filter> <meta-data android:name="android.service.wallpaper" android:resource="@xml/weather_wallpaper" /> </service> <activity android:name=".WallpaperEffectsDebugActivity" android:configChanges="uiMode" Loading
weathereffects/graphics/build.gradle 0 → 100644 +50 −0 Original line number Diff line number Diff line plugins { id 'com.android.library' id 'org.jetbrains.kotlin.android' } android { namespace 'com.google.android.wallpaper.weathereffects.graphics' compileSdk 34 defaultConfig { minSdk 34 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles "consumer-rules.pro" } sourceSets { main { java.srcDirs = ["${rootDir}/graphics/src"] } } buildTypes { debug { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' testCoverageEnabled true } release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' testCoverageEnabled true } } compileOptions { sourceCompatibility JavaVersion.VERSION_17 targetCompatibility JavaVersion.VERSION_17 } kotlinOptions { jvmTarget = '17' } } dependencies { implementation 'androidx.core:core-ktx:1.12.0' implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'com.google.android.material:material:1.11.0' } No newline at end of file