This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Built application files | |
*.apk | |
*.aar | |
*.ap_ | |
*.aab | |
# Files for the ART/Dalvik VM | |
*.dex | |
# Java class files | |
*.class | |
# Generated files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package cl.tempus.testopencvjava.ui.main; | |
import static androidx.core.content.ContextCompat.getSystemService; | |
import static org.opencv.android.CameraBridgeViewBase.CvCameraViewFrame; | |
import static org.opencv.android.CameraBridgeViewBase.CvCameraViewListener2; | |
import static cl.tempus.testopencvjava.utils.MyUtils.detectObjects; | |
import android.content.Context; | |
import android.os.Bundle; | |
import android.util.Log; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GRADLE BUILD - DOCKER STAGE | |
FROM gradle:7.5.1-jdk17-alpine as builder | |
ENV APP_HOME=/app | |
WORKDIR $APP_HOME | |
COPY build.gradle settings.gradle $APP_HOME | |
COPY gradle $APP_HOME/gradle | |
COPY --chown=gradle:gradle . /home/gradle/src | |
USER root | |
RUN chown -R gradle /home/gradle/src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val menuHost: MenuHost = requireActivity() | |
menuHost.addMenuProvider(object : MenuProvider { | |
override fun onCreateMenu(menu: Menu, menuInflater: MenuInflater) { | |
menuInflater.inflate(R.menu.myMenu, menu) | |
} | |
override fun onMenuItemSelected(menuItem: MenuItem): Boolean { | |
when (menuItem.itemId) { | |
R.id.myItem -> {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun onOptionsItemSelected(item: MenuItem): Boolean { | |
// Handle item click | |
return when (item.itemId) { | |
R.id.myItem -> { | |
true | |
} | |
else -> super.onOptionsItemSelected(item) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val prop = Properties().apply { | |
load(FileInputStream(File(rootProject.rootDir, "keystore.properties"))) | |
} | |
signingConfigs { | |
create("mysign") { | |
storeFile = file(prop.getProperty("storeFile")) | |
storePassword = prop.getProperty("storePassword").toString() | |
keyPassword = prop.getProperty("keyPassword").toString() | |
keyAlias = prop.getProperty("keyAlias").toString() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//CARGAR VARIABLES DESDE local.properties | |
with(gradleLocalProperties(rootDir)) { | |
buildConfigField("String", "MY_VAR", getProperty("MY_VAR")) | |
} | |
//EXCLUIR libreria desde una dependencia, ejemplo: | |
androidTestImplementation("androidx.test.espresso:espresso-contrib:3.4.0") { | |
exclude("protobuf-lite") | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include(":app") | |
rootProject.name = "Kotlin DSL" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//VERSION GROOVY | |
task clean(type: Delete) { | |
delete rootProject.buildDir | |
} | |
//VERSION DSL | |
tasks.register("clean", Delete::class) { | |
delete(rootProject.buildDir) | |
} |
NewerOlder