Skip to content

Commit 13644c8

Browse files
authored
Adding Android Developer Verification Sample (#110)
* Add Android Developer Verification onboarding sample. Add licenses updates throughout. Update readme.md files with deprecation warnings. * Update packaging.yaml * removed test packages
1 parent 12f7946 commit 13644c8

51 files changed

Lines changed: 1296 additions & 23 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
name: Build AndroidDeveloperVerificationOnboarding
15+
16+
on:
17+
push:
18+
branches: [ '*' ]
19+
paths:
20+
- 'AndroidDeveloperVerificationOnboarding/**'
21+
- '.github/workflows/Build_AndroidDeveloperVerificationOnboarding.yml'
22+
pull_request:
23+
branches: [ '*' ]
24+
paths:
25+
- 'AndroidDeveloperVerificationOnboarding/**'
26+
- '.github/workflows/Build_AndroidDeveloperVerificationOnboarding.yml'
27+
workflow_dispatch:
28+
29+
concurrency:
30+
group: ${{ github.workflow }}-${{ github.ref }}
31+
cancel-in-progress: true
32+
33+
jobs:
34+
build:
35+
name: Build AndroidDeveloperVerificationOnboarding
36+
runs-on: ubuntu-latest
37+
timeout-minutes: 30
38+
39+
defaults:
40+
run:
41+
working-directory: AndroidDeveloperVerificationOnboarding
42+
43+
steps:
44+
- uses: actions/checkout@v4
45+
with:
46+
token: ${{ secrets.PAT || github.token }}
47+
48+
- name: Set up Java
49+
uses: actions/setup-java@v4
50+
with:
51+
distribution: 'zulu'
52+
java-version: '17'
53+
54+
- name: Setup Gradle
55+
uses: gradle/actions/setup-gradle@v4
56+
57+
- name: Make gradlew executable
58+
run: chmod +x ./gradlew
59+
60+
- name: Build All
61+
run: ./gradlew build --stacktrace
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/caches
5+
/.idea/libraries
6+
/.idea/modules.xml
7+
/.idea/workspace.xml
8+
/.idea/navEditor.xml
9+
/.idea/assetWizardSettings.xml
10+
.DS_Store
11+
/build
12+
/captures
13+
.externalNativeBuild
14+
.cxx
15+
local.properties
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
# GOOGLE SAMPLE PACKAGING DATA
16+
#
17+
# This file is used by Google as part of our samples packaging process.
18+
# End users may safely ignore this file. It has no relevance to other systems.
19+
---
20+
status: PUBLISHED
21+
technologies: [Android]
22+
categories: [Security]
23+
languages: [Kotlin]
24+
solutions: [Mobile]
25+
github: android/security-samples
26+
level: BEGINNER
27+
apiRefs:
28+
license: apache2
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Android Developer Verification Onboarding Sample
2+
3+
Are you preparing to sign an APK for the Android developer verification proof of ownership process?
4+
5+
This project shows you exactly which file to create (adi-registration.properties) and provides the necessary folder structure to guide you. Use this template to check your placement of the file and ensure the correct insertion of your unique developer 'snippet' for successful verification.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
/*
2+
* Copyright 2025 The Android Open Source Project
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
plugins {
18+
alias(libs.plugins.android.application)
19+
alias(libs.plugins.kotlin.android)
20+
alias(libs.plugins.kotlin.compose)
21+
}
22+
23+
android {
24+
namespace = "com.androiddeveloperverification.onboarding"
25+
compileSdk = 35
26+
27+
defaultConfig {
28+
applicationId = "com.androiddeveloperverification.onboarding"
29+
minSdk = 33
30+
targetSdk = 35
31+
versionCode = 1
32+
versionName = "1.0"
33+
34+
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
35+
}
36+
37+
buildTypes {
38+
release {
39+
isMinifyEnabled = false
40+
proguardFiles(
41+
getDefaultProguardFile("proguard-android-optimize.txt"),
42+
"proguard-rules.pro"
43+
)
44+
}
45+
}
46+
compileOptions {
47+
sourceCompatibility = JavaVersion.VERSION_11
48+
targetCompatibility = JavaVersion.VERSION_11
49+
}
50+
kotlinOptions {
51+
jvmTarget = "11"
52+
}
53+
buildFeatures {
54+
compose = true
55+
}
56+
}
57+
58+
dependencies {
59+
60+
implementation(libs.androidx.core.ktx)
61+
implementation(libs.androidx.lifecycle.runtime.ktx)
62+
implementation(libs.androidx.activity.compose)
63+
implementation(platform(libs.androidx.compose.bom))
64+
implementation(libs.androidx.ui)
65+
implementation(libs.androidx.ui.graphics)
66+
implementation(libs.androidx.ui.tooling.preview)
67+
implementation(libs.androidx.material3)
68+
69+
testImplementation(libs.junit)
70+
androidTestImplementation(libs.androidx.junit)
71+
androidTestImplementation(libs.androidx.espresso.core)
72+
androidTestImplementation(platform(libs.androidx.compose.bom))
73+
androidTestImplementation(libs.androidx.ui.test.junit4)
74+
debugImplementation(libs.androidx.ui.tooling)
75+
debugImplementation(libs.androidx.ui.test.manifest)
76+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
# Add project specific ProGuard rules here.
3+
# You can control the set of applied configuration files using the
4+
# proguardFiles setting in build.gradle.
5+
#
6+
# For more details, see
7+
# http://developer.android.com/guide/developing/tools/proguard.html
8+
9+
# If your project uses WebView with JS, uncomment the following
10+
# and specify the fully qualified class name to the JavaScript interface
11+
# class:
12+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
13+
# public *;
14+
#}
15+
16+
# Uncomment this to preserve the line number information for
17+
# debugging stack traces.
18+
#-keepattributes SourceFile,LineNumberTable
19+
20+
# If you keep the line number information, uncomment this to
21+
# hide the original source file name.
22+
#-renamesourcefileattribute SourceFile
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright (C) 2025 The Android Open Source Project
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
18+
xmlns:tools="http://schemas.android.com/tools"
19+
package="com.androiddeveloperverification.onboarding">
20+
21+
<application
22+
android:allowBackup="true"
23+
android:dataExtractionRules="@xml/data_extraction_rules"
24+
android:fullBackupContent="@xml/backup_rules"
25+
android:icon="@mipmap/ic_launcher"
26+
android:label="@string/app_name"
27+
android:roundIcon="@mipmap/ic_launcher_round"
28+
android:supportsRtl="true"
29+
android:theme="@style/Theme.ExistingApp"
30+
tools:targetApi="31">
31+
<activity
32+
android:name=".MainActivity"
33+
android:exported="true"
34+
android:label="@string/app_name"
35+
android:theme="@style/Theme.ExistingApp">
36+
<intent-filter>
37+
<action android:name="android.intent.action.MAIN" />
38+
39+
<category android:name="android.intent.category.LAUNCHER" />
40+
</intent-filter>
41+
</activity>
42+
</application>
43+
44+
</manifest>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DPAW2Z2OZAAACAAAAAAAAAAAAA
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* Copyright 2025 The Android Open Source Project
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.androiddeveloperverification.onboarding
18+
19+
import android.os.Bundle
20+
import androidx.activity.ComponentActivity
21+
import androidx.activity.compose.setContent
22+
import androidx.activity.enableEdgeToEdge
23+
import androidx.compose.material3.MaterialTheme
24+
import com.androiddeveloperverification.onboarding.ui.screens.GreetingScreen
25+
26+
class MainActivity : ComponentActivity() {
27+
override fun onCreate(savedInstanceState: Bundle?) {
28+
super.onCreate(savedInstanceState)
29+
enableEdgeToEdge()
30+
setContent {
31+
MaterialTheme {
32+
GreetingScreen()
33+
}
34+
}
35+
}
36+
}

0 commit comments

Comments
 (0)