gradlew build --warning-mode all --info
gradlew clean build --stacktrace



gradlew build
gradlew build -Xlint:deprecation
gradlew assembleRelease
gradlew build --warning-mode all
./gradlew debugBuild --scan


banner_ad_unit_id

build.gradle (project-level)

    Add Firebase Gradle buildscript dependency
        classpath 'com.google.gms:google-services:3.2.1'


 
app/build.gradle

    Add Firebase plugin for Gradle
        apply plugin: 'com.google.gms.google-services'



======================================================================

apply plugin: 'com.android.application'

android {

    lintOptions{
        disable 'MissingTranslation'
    }

    signingConfigs {
//        config {
//            keyAlias 'isaidit'
//            keyPassword 'isaidit'
//            storeFile file('../keystore/1016_isaidit.key')
//            storePassword 'isaidit'
//        }



        config {
            keyAlias 'origami'
            keyPassword '@!sfuQ123zpc'
            storeFile file('D:/walhalla/keystore.jks')
            storePassword '@!sfuQ123zpc'
        }
    }


    compileSdkVersion 27
    buildToolsVersion '28.0.2'

    defaultConfig {
        applicationId "com.walhalla.pocketinstructor"

        minSdkVersion 16
        targetSdkVersion 27

        versionCode 1
        versionName versionCode + "-" + getTimestamp()
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
        // Enabling multidex support.
        multiDexEnabled false
    }
    buildTypes {

        debug {
            multiDexEnabled false
            debuggable true
            jniDebuggable true
            minifyEnabled false
        }

        release {
            minifyEnabled true
            //proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            //best obfuscation -> -optimize
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'

            debuggable false
            jniDebuggable false
            signingConfig signingConfigs.config
            renderscriptDebuggable false
            pseudoLocalesEnabled true
//            applicationIdSuffix '.a'
            versionNameSuffix 'b'
//            zipAlignEnabled true
//             Enabling multidex support.
            multiDexEnabled false
        }
    }


    flavorDimensions 'W'

    productFlavors {

        googleplay {
            //versionName = "gp"
            project.ext.set("archivesBaseName", "gp-" + defaultConfig.versionName);
            flavorDimensions 'W'
            resValue 'string', 'market_rate_url', 'market://details?id=%1$s'
        }
        amazon {
            //versionName = "a"
            project.ext.set("archivesBaseName", "a-" + defaultConfig.versionName);
            flavorDimensions 'W'
            resValue 'string', 'market_rate_url', 'http://www.amazon.com/gp/mas/dl/android?p=%1$s'
        }
    }


    dexOptions {
        preDexLibraries = false
        //fail>javaMaxHeapSize "2g"
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

def FOO = '27.1.1'

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    implementation "com.android.support:appcompat-v7:$FOO"
    implementation "com.android.support:design:$FOO"
    implementation('uk.co.chrisjenx:calligraphy:2.2.0') {
        exclude group: 'com.android.support', module: 'support-v4'
    }
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    implementation 'com.jakewharton:butterknife:8.6.0'

//    implementation('com.google.android.gms:play-services-ads:15.0.1') {
//        exclude group: 'com.android.support'
//    }


    implementation("com.google.firebase:firebase-ads:15.0.1") {
        exclude group: 'com.android.support'
    }

    implementation 'com.google.code.gson:gson:2.8.5'
    implementation 'com.arello-mobile:moxy-app-compat:1.5.3'
    implementation 'com.arello-mobile:moxy:1.5.3'
    implementation 'com.github.bumptech.glide:glide:4.3.1'
    testImplementation 'junit:junit:4.12'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.6.0'
    annotationProcessor 'com.arello-mobile:moxy-compiler:1.5.3'
    implementation 'com.google.dagger:dagger:2.11'
    annotationProcessor 'com.google.dagger:dagger-compiler:2.11'
    implementation('com.github.piasy:BigImageViewer:1.4.0') {
        exclude group: 'com.android.support', module: 'support-v4'
    }
    // load with glide
    //    implementation 'com.github.piasy:GlideImageLoader:1.4.0'
    //
    //    // progress pie indicator
    //    implementation 'com.github.piasy:ProgressPieIndicator:1.4.0'
    //@    implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.6.0';

    //Themes
    implementation 'com.52inc:scoops:1.0.0'
    implementation project(':ui')
    implementation project(':wads')
}

static def getTimestamp() {
    def date = new Date()
    return date.format('yyyyMMdd.HHmm')
}









//implementation files('../libs/game_lib.jar')



@@@@@@@@@@@@@ ROOM @@@@@@@@@@@@@
 implementation "android.arch.persistence.room:runtime:1.1.1"
 annotationProcessor "android.arch.persistence.room:compiler:1.1.1"




No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android



// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.0-rc03'
        

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

allprojects {
    repositories {
        google()
        jcenter()
    }
}

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

==============================================================================s






=============
FreeOpenVPN.Org config fil












MultiDex -> 65536


android{
    useLibrary 'org.apache.http.legacy'

sourceSets { main { assets.srcDirs = ['src/main/assets', 'src/main/assets/'] } }
}


@dependency{
compile 'com.android.volley:volley:1.1.0'
}

-encoding UTF-8 -docencoding utf-8 -charset utf-8



gradlew assembleDebug --stacktrace
gradlew assembleDebug --stacktrace

gradlew clean


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=

   implementation("com.google.firebase:firebase-ads:${GOO}") {
        exclude group: 'com.android.support'
    }

implementation ('com.google.android.gms:play-services-ads:15.0.1') {
        exclude group: 'com.android.support', module: 'support-v4'
    }

 compile(project(':react-native-maps')){
      exclude group: 'com.google.android.gms', module: 'play-services-base'
      exclude group: 'com.google.android.gms', module: 'play-services-maps'
   }

C:\Users\combo\.gradle\wrapper\dists
./gradlew wrapper --gradle-version=4.1 --distribution-type=bin

-Xmx768m


gradlew -info
gradlew -stacktrace

gradlew app:dependencies //<----------------------------------------------------------------
gradlew clean



gradlew -q dependencies app:dependencies --configuration implementation        #Просмотр
gradlew -q dependencies
 зависимостей
мастер оф паппетс
================================================================================================

gradlew htmlDependencyReport

gradlew app:dependencies @@@@@@@@@@@@@@@@@@@@@@@@@@
gradlew app:dependencies @@@@@@@@@@@@@@@@@@@@@@@@@@

gradlew -q dependencies Bitrix:dependencies --configuration implementation
gradlew Bitrix:dependencies > 1.txt
gradlew -q dependencies app:dependencies --configuration implementation  > 1.txt
gradlew :app:dependencies --configuration implementation  > 1.txt

gradlew task ':app:transformClassesWithDexForDebug' --stacktrace
gradlew app:transformClassesWithDexForRelease --stacktrace
gradlew task

gradlew --help task

gradlew --help task --all

gradlew task ':app:compile' -Xlint:deprecation


gradlew task ':app:compile' --stacktrace

gradlew task ':app:processDebugGoogleServices' --stacktrace




gradle wrapper
With gradle 2.4 (or higher) you can set up a wrapper without adding a dedicated task:

gradle wrapper --gradle-version 2.3

./gradlew assembleRelease



gradlew :app:assembleDebug --stacktrace -Xlint





===================================
BASE APP
===================================
    //di
    compile 'com.google.dagger:dagger:2.11'
    annotationProcessor 'com.google.dagger:dagger-compiler:2.11'




=============================================================================
include ':FragmentNavigator'
project(':FragmentNavigator').projectDir = new File(settingsDir, '../../Libraries/FragmentNavigator/library')

include ':app'
include ':mcsoxford_rss'
project(':mcsoxford_rss').projectDir = new File('C:\\android\\ANDROID_TUTORIAL\\$Modules\\android-rss')


compile project(path: ':FragmentNavigator')

----------------
Gradle library
----------------

build.gradle

apply plugin: 'java'
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
}

----------

build.gradle

apply plugin: 'com.android.library'
android {
    compileSdkVersion 23    buildToolsVersion "23.0.3"
    defaultConfig {
        minSdkVersion 14        targetSdkVersion 23        versionCode 1        versionName "1.0"    }
    buildTypes {
        release {
            minifyEnabled false            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:23.4.0'}

settings.gradle

include ':app', ':lib', ':mylibrary' //Include library




local.properties


ndk.dir=D\:\\Android\\AndroidSDK\\ndk-bundlesdk.dir=D\:\\Android\\AndroidSDK

================================================================


apply from: 'C:\\android\\versions.gradle'


android {
    compileSdkVersion versionCompile
    buildToolsVersion versionBuildTool
...
minSdkVersion versionMin
targetSdkVersion versionTarget


${versionSupportLib}
compile "com.android.support:design:${versionSupportLib}"
    compile "com.android.support:palette-v7:${versionSupportLib}"
    compile "com.android.support:cardview-v7:${versionSupportLib}"


=====================


project build.gradle

ext{
    versionCompile = 26
    versionBuildTool = '26.0.0 rc2'

    versionMin = 15
    versionTarget = 26
    versionSupportLib = '26.0.0-alpha1'


    okhttpVersion = '3.4.1'
    retrofitVersion = '2.1.0'
    rxandroidVersion = '1.2.1'
    rxjavaVersion = '1.1.10'
    rxLoaderVersion = '0.1.2'
    butterKnifeVersion = '8.3.0'
    hawkVersion = '1.23'

    junitVersion = '4.12'
    mockitoVersion = '1.10.19'
    powerMockVersion = '1.6.5'
    robolectricVersion = '3.1.2'
}


build.gradle
-- core

apply plugin: 'java'

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.google.code.gson:gson:2.8.0'
    compile 'com.google.code.findbugs:findbugs:3.0.1'
}

gradle.properties
# org.gradle.parallel=true
org.gradle.jvmargs=-Xmx1024m


gradlew build --stacktrace > logs.txt 2>logErrors.txt

🎭 Набор инструментов техномага

🛠 Инструменты разработки

  • Android Studio Portable - для быстрого доступа к Android разработке
  • VSCode Portable - легковесный редактор с поддержкой множества расширений
  • Git Portable - для контроля версий
  • Postman Portable - тестирование API
  • DBeaver Portable - универсальный инструмент для работы с БД

🔮 Утилиты для повышения продуктивности

  • AutoHotkey - автоматизация рутинных задач
  • Everything - мгновенный поиск файлов
  • Keypirinha - продвинутый лаунчер
  • ShareX - продвинутые скриншоты и запись экрана
  • SumatraPDF - быстрый просмотр PDF и технической документации

🧙‍♂️ Специальные инструменты техномага

  • WireShark Portable - анализ сетевого трафика
  • ProcessHacker - продвинутый диспетчер задач
  • RegShot - отслеживание изменений в системе
  • NirSoft Suite - набор системных утилит
  • PowerToys - расширенные возможности Windows

📱 Мобильная разработка

  • Scrcpy - управление Android устройством с ПК
  • ADB Platform Tools - отладка Android приложений
  • Charles Proxy - перехват и анализ HTTP/HTTPS трафика

🔐 Безопасность

  • KeePass - менеджер паролей
  • VeraCrypt - шифрование данных
  • OpenVPN - безопасное соединение

📊 Производительность

  • Obsidian Portable - создание базы знаний
  • Notion - организация проектов
  • Anki - система интервального повторения для изучения нового

🎨 Креативные инструменты

Это базовый набор, который можно дополнять специфическими инструментами под ваши конкретные задачи. Помните, что истинная сила техномага не в количестве инструментов, а в умении эффективно их использовать! 🧙‍♂️✨

android - ktor

 fun main() = runBlocking {
    val client = HttpClient(CIO) {
        install(ContentNegotiation)
        install(Logging) {
            level = LogLevel.ALL
        }
    }

    val filesToUpload = listOf(
        "/path/to/file1.jpg",
        "/path/to/file2.pdf"
    )

    val response: HttpResponse = client.post("https://example.com/upload") {
        setBody(
            MultiPartFormDataContent(
                formData {
                    filesToUpload.forEachIndexed { index, filePath ->
                        val file = java.io.File(filePath)
                        append(
                            key = "file$index",
                            value = file.readBytes(),
                            headers = Headers.build {
                                append(HttpHeaders.ContentDisposition, "form-data; name=\"file$index\"; filename=\"${file.name}\"")
                            }
                        )
                    }
                }
            )
        )
    }

    println("Response: ${response.status}, body: ${response.bodyAsText()}")

    client.close()
}

===
import io.ktor.client.*
import io.ktor.client.engine.cio.*
import io.ktor.client.request.*
import io.ktor.client.statement.*
import io.ktor.http.*
import io.ktor.client.plugins.contentnegotiation.*
import io.ktor.serialization.kotlinx.json.*
import io.ktor.client.request.forms.*
import kotlinx.coroutines.*
import kotlinx.serialization.*
import java.io.File

// Пример POJO-класса (используем kotlinx.serialization для сериализации)
@Serializable
data class MyPojo(
    val id: Int,
    val name: String
)

fun main() = runBlocking {
    val client = HttpClient(CIO) {
        install(ContentNegotiation) {
            json() // Подключение JSON-сериализации
        }
    }

    val filesToUpload = listOf(
        File("/path/to/file1.jpg"),
        File("/path/to/file2.pdf")
    )

    // Создаем экземпляр POJO
    val myPojo = MyPojo(id = 123, name = "Example Name")

    val response: HttpResponse = client.post("https://example.com/upload") {
        setBody(
            MultiPartFormDataContent(
                formData {
                    // Добавляем JSON как часть формы
                    append(
                        key = "json",
                        value = kotlinx.serialization.json.Json.encodeToString(MyPojo.serializer(), myPojo),
                        headers = Headers.build {
                            append(HttpHeaders.ContentType, ContentType.Application.Json.toString())
                        }
                    )

                    // Добавляем файлы как части формы
                    filesToUpload.forEachIndexed { index, file ->
                        append(
                            key = "file$index",
                            value = file.readBytes(),
                            headers = Headers.build {
                                append(HttpHeaders.ContentDisposition, "form-data; name=\"file$index\"; filename=\"${file.name}\"")
                            }
                        )
                    }
                }
            )
        )
    }

    println("Response: ${response.status}, body: ${response.bodyAsText()}")

    client.close()
}
====


fun main() = runBlocking {
    val client = HttpClient(CIO) {
        install(ContentNegotiation) {
            json()
        }
    }

    val filesToUpload = listOf(
        File("/path/to/largefile1.mp4"),
        File("/path/to/largefile2.zip")
    )

    val myPojo = MyPojo(id = 123, name = "Example Data")

    val response: HttpResponse = client.post("https://example.com/upload") {
        setBody(
            MultiPartFormDataContent(
                formData {
                    // Добавляем JSON как часть формы
                    append(
                        key = "json",
                        value = kotlinx.serialization.json.Json.encodeToString(MyPojo.serializer(), myPojo),
                        headers = Headers.build {
                            append(HttpHeaders.ContentType, ContentType.Application.Json.toString())
                        }
                    )

                    // Добавляем файлы с использованием потоков
                    filesToUpload.forEachIndexed { index, file ->
                        appendInput(
                            key = "file$index",
                            headers = Headers.build {
                                append(HttpHeaders.ContentDisposition, "form-data; name=\"file$index\"; filename=\"${file.name}\"")
                            },
                            size = file.length()
                        ) {
                            file.inputStream() // Поток файла
                        }
                    }
                }
            )
        )
    }

    println("Response: ${response.status}, body: ${response.bodyAsText()}")

    client.close()
}



===

val response: HttpResponse = client.post("https://example.com/upload") {
        setBody(
            MultiPartFormDataContent(
                formData {
                    // Добавляем JSON как часть формы
                    append(
                        key = "json",
                        value = kotlinx.serialization.json.Json.encodeToString(MyPojo.serializer(), myPojo),
                        headers = Headers.build {
                            append(HttpHeaders.ContentType, ContentType.Application.Json.toString())
                        }
                    )

                    // Добавляем файлы с использованием массива ключей files[]
                    filesToUpload.forEach { file ->
                        appendInput(
                            key = "files[]", // Массив файлов с ключом files[]
                            headers = Headers.build {
                                append(HttpHeaders.ContentDisposition, "form-data; name=\"files[]\"; filename=\"${file.name}\"")
                            },
                            size = file.length()
                        ) {
                            file.inputStream()
                        }
                    }
                }
            )
        )
    }
    
    
    ===
    
    
    <?php
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    // Чтение JSON
    $json = json_decode($_POST['json'], true);
    print_r($json); // Данные JSON

    // Обработка файлов
    foreach ($_FILES['files']['name'] as $index => $name) {
        $tmpName = $_FILES['files']['tmp_name'][$index];
        $size = $_FILES['files']['size'][$index];
        $error = $_FILES['files']['error'][$index];

        if ($error === UPLOAD_ERR_OK) {
            $destination = "uploads/" . basename($name);
            move_uploaded_file($tmpName, $destination);
            echo "Файл $name успешно загружен в $destination\n";
        } else {
            echo "Ошибка при загрузке файла $name\n";
        }
    }
}
?>
===
передача JSON в теле запроса (body) несовместима с форматом multipart/form-data

===

Если сервер поддерживает multipart/form-data


"""
Speech to Text
Speech to Text

ACTION_RECOGNIZE_SPEECH


private const val BASE_URL = "https://jsonplaceholder.typicode.com/"

private const val TIME_OUT = 6000

suspend fun makeRequest() {


    val client = HttpClient(Android) {

        install(Logging) {
            logger = object : Logger {
                override fun log(message: String) {
                    Log.d("@@@:", message)
                }
            }
        }

        engine {
            // this: AndroidEngineConfig
            connectTimeout = 100_000
            socketTimeout = 100_000
            //proxy = Proxy(Proxy.Type.HTTP, InetSocketAddress("localhost", 8080))
        }
    }

    val client0 = HttpClient(CIO) {

    }

    val response: HttpResponse = client.request("https://ktor.io/") {
        // Configure request parameters exposed by HttpRequestBuilder
    }
    println("======"+response.bodyAsText())
}

=====

dependencies {
    implementation "androidx.compose.material:material-icons-extended:$compose_ui_version"
}

Step 3: Working with the MainActivity.kt file

Go to the MainActivity.kt file and refer to the following code. Below is the code for the MainActivity.kt file. Comments are added inside the code to understand the code in more detail.
Kotlin




package com.geeksforgeeks.passwordtoggle
 
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.material.*
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Visibility
import androidx.compose.material.icons.filled.VisibilityOff
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.input.KeyboardType
import androidx.compose.ui.text.input.PasswordVisualTransformation
import androidx.compose.ui.text.input.VisualTransformation
 
class MainActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContent {
 
            // Creating a Simple Scaffold
            // Layout for the application
            Scaffold(
 
                // Creating a Top Bar
                topBar = { TopAppBar(title = { Text("GFG | Toggle Password", color = Color.White) }, backgroundColor = Color(0xff0f9d58)) },
 
                // Creating Content
                content = {
 
                    // Creating a Column Layout
                    Column(Modifier.fillMaxSize(), horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.Center) {
 
                        // Creating a variable to store password
                        var password by remember { mutableStateOf("") }
                         
                        // Creating a variable to store toggle state
                        var passwordVisible by remember { mutableStateOf(false) }
 
                        // Create a Text Field for giving password input
                        TextField(
                            value = password,
                            onValueChange = { password = it },
                            label = { Text("Password") },
                            singleLine = true,
                            placeholder = { Text("Password") },
                            visualTransformation = if (passwordVisible) VisualTransformation.None else PasswordVisualTransformation(),
                            keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Password),
                            trailingIcon = {
                                val image = if (passwordVisible)
                                    Icons.Filled.Visibility
                                else Icons.Filled.VisibilityOff
 
                                // Localized description for accessibility services
                                val description = if (passwordVisible) "Hide password" else "Show password"
 
                                // Toggle button to hide or display password
                                IconButton(onClick = {passwordVisible = !passwordVisible}){
                                    Icon(imageVector  = image, description)
                                }
                            }
                        )
 
                    }
                }
            )
        }
    }
}
 
/*
Note: to use Icons.Filled.Visibility and Icons.Filled.VisibilityOff
add in the dependencies: implementation "androidx.compose.material:material-icons-extended:$compose_version"
*/
===

https://www.youtube.com/watch?app=desktop&v=4MJFmhcONfI&ab_channel=PhilippLackner

implementation "androidx.compose.material:material-icons-extended:1.3.1"
https://medium.com/google-developer-experts/how-to-create-a-composable-password-with-jetpack-compose-f1be2d48d9f0