Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ androidx-xr-scenecore = "1.0.0-alpha10"
androidxHiltNavigationCompose = "1.3.0"
appcompat = "1.7.1"
arcorePlayServices = "1.0.0-alpha09"
playbilling = "8.3.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For better organization and to avoid potential conflicts, it's a good practice to name version aliases with a prefix related to the library group, for example, android-playbilling or google-playbilling.

Suggested change
playbilling = "8.3.0"
google-playbilling = "8.3.0"

coil = "2.7.0"
# @keep
compileSdk = "36"
Expand Down Expand Up @@ -98,6 +99,7 @@ wearToolingPreview = "1.0.0"
webkit = "1.14.0"
wearPhoneInteractions = "1.1.0"
wearRemoteInteractions = "1.1.0"
runtime = "1.10.0"

[libraries]
accompanist-adaptive = "com.google.accompanist:accompanist-adaptive:0.37.3"
Expand Down Expand Up @@ -202,6 +204,7 @@ androidx-xr-arcore = { module = "androidx.xr.arcore:arcore", version.ref = "andr
androidx-xr-compose = { module = "androidx.xr.compose:compose", version.ref = "androidx-xr-compose" }
androidx-xr-scenecore = { module = "androidx.xr.scenecore:scenecore", version.ref = "androidx-xr-scenecore" }
appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }
billing = { module = "com.android.billingclient:billing", version.ref = "playbilling" }
coil-kt-compose = { module = "io.coil-kt:coil-compose", version.ref = "coil" }
compose-foundation = { module = "androidx.wear.compose:compose-foundation", version.ref = "wearComposeFoundation" }
compose-ui-tooling = { module = "androidx.wear.compose:compose-ui-tooling", version.ref = "composeUiTooling" }
Expand Down Expand Up @@ -241,6 +244,7 @@ wear-compose-material = { module = "androidx.wear.compose:compose-material", ver
wear-compose-material3 = { module = "androidx.wear.compose:compose-material3", version.ref = "wearComposeMaterial3" }
androidx-wear-phone-interactions = { group = "androidx.wear", name = "wear-phone-interactions", version.ref = "wearPhoneInteractions" }
androidx-wear-remote-interactions = { group = "androidx.wear", name = "wear-remote-interactions", version.ref = "wearRemoteInteractions" }
androidx-runtime = { group = "androidx.compose.runtime", name = "runtime", version.ref = "runtime" }

[plugins]
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }
Expand Down
1 change: 1 addition & 0 deletions playbilling/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

It's a common convention for text files to end with a newline character. This prevents issues with some tools and file concatenation. Please add a newline at the end of this file.

/build

44 changes: 44 additions & 0 deletions playbilling/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
plugins {
alias(libs.plugins.android.application)
}

android {
namespace 'com.example.pbl'
compileSdk {
version = release(36) {
minorApiLevel = 1
}
}

defaultConfig {
applicationId "com.example.pbl"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using the com.example namespace is discouraged for production applications as it's reserved for documentation and samples. This can lead to conflicts when uploading to the Play Store. Please use a unique application ID, typically based on a reverse domain name you own.

minSdk 24
targetSdk 36
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}

dependencies {
implementation libs.guava
implementation libs.billing
implementation libs.androidx.appcompat
implementation libs.google.android.material
implementation libs.androidx.runtime
testImplementation libs.junit
androidTestImplementation libs.androidx.test.ext.junit
androidTestImplementation libs.androidx.test.espresso.core
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

It's a common convention for text files to end with a newline character. This prevents issues with some tools and file concatenation. Please add a newline at the end of this file.

}

21 changes: 21 additions & 0 deletions playbilling/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

It's a common convention for text files to end with a newline character. This prevents issues with some tools and file concatenation. Please add a newline at the end of this file.

#-renamesourcefileattribute SourceFile

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.example.pbl;

import android.content.Context;

import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;

import static org.junit.Assert.*;

/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.example.pbl", appContext.getPackageName());
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

It's a common convention for text files to end with a newline character. This prevents issues with some tools and file concatenation. Please add a newline at the end of this file.

Suggested change
}
}

27 changes: 27 additions & 0 deletions playbilling/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2026 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
https://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.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Snippets" />
Comment on lines +19 to +25
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

This module is configured as an application via plugins { alias(libs.plugins.android.application) } in build.gradle, but there's no launchable Activity declared in the AndroidManifest.xml. An application module requires at least one Activity with an intent filter for android.intent.action.MAIN and android.intent.category.LAUNCHER to be installed and launched on a device.

For example:

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


</manifest>
Loading
Loading