Skip to content

Commit 47e3500

Browse files
author
Mark Ramos
committed
Initial commit
0 parents  commit 47e3500

File tree

73 files changed

+3432
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+3432
-0
lines changed

.gitignore

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Gradle files
2+
.gradle/
3+
build/
4+
5+
# Local configuration file (sdk path, etc)
6+
local.properties
7+
8+
# Log/OS Files
9+
*.log
10+
11+
# Android Studio generated files and folders
12+
captures/
13+
.externalNativeBuild/
14+
.cxx/
15+
*.apk
16+
output.json
17+
18+
# IntelliJ
19+
*.iml
20+
.idea/
21+
misc.xml
22+
deploymentTargetDropDown.xml
23+
render.experimental.xml
24+
25+
# Keystore files
26+
*.jks
27+
*.keystore
28+
29+
# Google Services (e.g. APIs or Firebase)
30+
google-services.json
31+
32+
# Android Profiling
33+
*.hprof

CameraLibrary/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

CameraLibrary/build.gradle.kts

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
plugins {
2+
alias(libs.plugins.android.library)
3+
alias(libs.plugins.kotlin.android)
4+
id("maven-publish")
5+
}
6+
7+
android {
8+
namespace = "com.markramosonline.cameralibrary"
9+
compileSdk = 35
10+
11+
defaultConfig {
12+
minSdk = 24
13+
14+
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
15+
consumerProguardFiles("consumer-rules.pro")
16+
}
17+
18+
buildTypes {
19+
release {
20+
isMinifyEnabled = false
21+
proguardFiles(
22+
getDefaultProguardFile("proguard-android-optimize.txt"),
23+
"proguard-rules.pro"
24+
)
25+
}
26+
}
27+
compileOptions {
28+
sourceCompatibility = JavaVersion.VERSION_11
29+
targetCompatibility = JavaVersion.VERSION_11
30+
}
31+
kotlinOptions {
32+
jvmTarget = "11"
33+
}
34+
}
35+
36+
dependencies {
37+
38+
implementation(libs.androidx.core.ktx)
39+
implementation(libs.androidx.appcompat)
40+
implementation(libs.material)
41+
testImplementation(libs.junit)
42+
androidTestImplementation(libs.androidx.junit)
43+
androidTestImplementation(libs.androidx.espresso.core)
44+
45+
implementation(libs.androidx.camera.core)
46+
implementation(libs.androidx.camera.camera2)
47+
implementation(libs.androidx.camera.lifecycle)
48+
implementation(libs.androidx.camera.view)
49+
50+
}
51+
52+
publishing {
53+
publications {
54+
create<MavenPublication>("release") {
55+
afterEvaluate {
56+
from(components["release"]) // Use 'default' for Android libraries
57+
// groupId = "com.github.miong13" // Change to your GitHub username for JitPack
58+
// artifactId = "cameralibrary" // Change to your library name
59+
// version = "1.0.0" // Update the version accordingly
60+
}
61+
}
62+
}
63+
}

CameraLibrary/consumer-rules.pro

Whitespace-only changes.

CameraLibrary/proguard-rules.pro

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.markramosonline.cameralibrary
2+
3+
import androidx.test.platform.app.InstrumentationRegistry
4+
import androidx.test.ext.junit.runners.AndroidJUnit4
5+
6+
import org.junit.Test
7+
import org.junit.runner.RunWith
8+
9+
import org.junit.Assert.*
10+
11+
/**
12+
* Instrumented test, which will execute on an Android device.
13+
*
14+
* See [testing documentation](http://d.android.com/tools/testing).
15+
*/
16+
@RunWith(AndroidJUnit4::class)
17+
class ExampleInstrumentedTest {
18+
@Test
19+
fun useAppContext() {
20+
// Context of the app under test.
21+
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22+
assertEquals("com.markramosonline.cameralibrary.test", appContext.packageName)
23+
}
24+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
3+
<uses-permission android:name="android.permission.CAMERA"/>
4+
<uses-feature android:name="android.hardware.camera.any"/>
5+
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
6+
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
7+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
8+
android:maxSdkVersion="28" />
9+
</manifest>

0 commit comments

Comments
 (0)