project templates

blockly
json
form
----
template replacing
----
project templates

ex:
youtube to android app

parameters
1)project folder name
2)app name
3)package name
4)icon
5)screenshots
6)list of play  list ids, their name
7)facebook page url
8)contact email
9)key store name
10)key store password
11)key store alias
12)keystore location

functionalities
1)keyword replace in file
2)keyword replace in project
3)directorye, path creation based on keyword
4)file creation  app_key_store.jks
5)building the apk
6)reapting
7)condition based code
---
can not we use existing template framework
or
can not we use gradle
can not we use maven
can we combine template framework + gradle
----
do i need to code all
----
how can i build fast
----
how to create apk using android build tool from anroid project?
create hello again project
add label hello world
test locally using simulator
find command to create apk


https://www.built.io/blog/building-android-applications-apk-from-the-command-line
----
D:\ikbhal\git\friendlychat-android-master\HelloAgain

gradlew assembleRelease

#This creates an APK named module_name-unsigned.apk in project_name/module_name/build/outputs/apk/
cd D:\ikbhal\git\friendlychat-android-master\HelloAgain\app\build\outputs\apk\release

#zipalign -v -p 4 my-app-unsigned.apk my-app-unsigned-aligned.apk
zipalign -v -p 4 app-release-unsigned.apk app-release-unsigned-aligned.apk
#apksigner sign --ks my-release-key.jks --out my-app-release.apk my-app-unsigned-aligned.apk
apksigner sign --ks my-release-key.jks --out app-release.apk app-release-unsigned-aligned.apk

#apksigner verify my-app-release.apk
apksigner verify app-release.apk
---
android {
    ...
    defaultConfig { ... }
    signingConfigs {
        release {
            storeFile file("my-release-key.jks")
            storePassword "password"
            keyAlias "my-alias"
            keyPassword "password"
        }
    }
    buildTypes {
        release {
            signingConfig signingConfigs.release
            ...
        }
    }
}

---
gradlew assembleRelease
---
keytool -genkey -v -keystore my-release-key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias my-alias
---

D:\ikbhal\git\friendlychat-android-master\HelloAgain\app\build\outputs\apk\relea
se>keytool -genkey -v -keystore my-release-key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias my-alias
Enter keystore password:
Re-enter new password:
What is your first and last name?
  [Unknown]:  Muhammad Iqbal
What is the name of your organizational unit?
  [Unknown]:  Muhammad Iqbal
What is the name of your organization?
  [Unknown]:  Muhammad Iqbal
What is the name of your City or Locality?
  [Unknown]:  Bangalore
What is the name of your State or Province?
  [Unknown]:  Karnataka
What is the two-letter country code for this unit?
  [Unknown]:  IN
Is CN=Muhammad Iqbal, OU=Muhammad Iqbal, O=Muhammad Iqbal, L=Bangalore, ST=Karna
taka, C=IN correct?
  [no]:  yes

Generating 2,048 bit RSA key pair and self-signed certificate (SHA256withRSA) wi
th a validity of 10,000 days
        for: CN=Muhammad Iqbal, OU=Muhammad Iqbal, O=Muhammad Iqbal, L=Bangalore
, ST=Karnataka, C=IN
Enter key password for
        (RETURN if same as keystore password):
[Storing my-release-key.jks]

---
app/build.gradle
apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.muhammad.iqbal.helloagain.helloagain"
        minSdkVersion 26
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    signingConfigs {
        release {
            storeFile file("my-release-key.jks")
            storePassword "Faaiza@786"
            keyAlias "my-alias"
            keyPassword "Faaiza@786"
        }
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation"org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
    implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
---
gradlew assembleRelease
---
can we specify all parameters of keytool as parameters

No comments:

Post a Comment