Skip to content

Latest commit

 

History

History
146 lines (126 loc) · 4.8 KB

File metadata and controls

146 lines (126 loc) · 4.8 KB

CamerApp

Tugas Camera Kelas PPB A 2021

SETUP DEPENDENCY

~/build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    ext.kotlin_version = "1.3.72"
    repositories {
        google()
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath "com.android.tools.build:gradle:7.0.3"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.30"
        classpath "com.google.gms:google-services:4.3.10"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

~/app/build.gradle

plugins {
    id 'com.android.application'
    id 'kotlin-android'
    id 'kotlin-android-extensions'
    id 'kotlin-kapt'
    id 'com.google.gms.google-services'
}

android {
    compileSdk 31

    defaultConfig {
        applicationId "com.camerax.app"
        minSdk 23
        targetSdk 31
        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_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
}

dependencies {

    implementation "org.jetbrains.kotlin:kotlin-stdlib:1.5.31"
    implementation 'androidx.core:core-ktx:1.7.0'
    implementation 'androidx.appcompat:appcompat:1.3.1'
    implementation 'com.google.android.material:material:1.4.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.1'

    implementation 'androidx.recyclerview:recyclerview:1.2.1'
    implementation 'com.github.bumptech.glide:glide:4.12.0'
    implementation 'androidx.viewpager:viewpager:1.0.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'

    // firebase
    implementation 'com.google.firebase:firebase-storage-ktx:20.0.0'
    implementation platform('com.google.firebase:firebase-bom:29.0.0')
    implementation 'com.google.firebase:firebase-analytics-ktx'
    implementation 'com.google.firebase:firebase-firestore-ktx:24.0.0'

    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}

Struktur

In our implementation, here is the list of files that we create or change

PROGRAM

LAYOUT

  • drawable
    • btn_bg
    • btn_bg_green
    • btn_bg_red
    • row_bg
    • ic_cam
    • ic_delete
    • ic_gallery
    • ic_refresh
  • layout
    • activity_image
    • activity_main
    • fragment_gallery_fullscreen
    • image_fullscreen
    • item_gallery_image
    • item_image
  • menu
    • menu_main
  • values
    • colors
    • strings
    • themes

Manifest

AndroidManifest

google-services.json Firebase

file tambahan ~/app/google-services.json digunakan untuk konfigurasi Firebase