Skip to content

Commit

Permalink
Merge pull request #11 from amirisback/develop/update-gradle
Browse files Browse the repository at this point in the history
UPDATE :: Gradle


Co-authored-by: frogoboxbot <[email protected]>
  • Loading branch information
amirisback and frogoboxbot authored Apr 29, 2023
2 parents 9279b5a + 7e170aa commit 3f71e71
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/android-ci-generate-apk-aab-download.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Set Up JDK
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17

- name: Change wrapper permissions
run: chmod +x ./gradlew
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/android-ci-generate-apk-aab-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Set Up JDK
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17

- name: Change wrapper permissions
run: chmod +x ./gradlew
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/android-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Set Up JDK
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17

- name: Change wrapper permissions
run: chmod +x ./gradlew
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,15 @@
## Version Release
This Is Latest Release

$version_release = 2.1.1
$version_release = 2.2.0

What's New??

* Update Action Script *
* Update Android Studio Latest Version *
* Update Gradle Latest Version *
* Update Kotlin Latest Version *
* Update Java Version From 11 to 17 *

## Article Sources
- [How To Securely Build and Sign Your Android App With GitHub Actions](https://proandroiddev.com/how-to-securely-build-and-sign-your-android-app-with-github-actions-ad5323452ce)
Expand Down Expand Up @@ -91,7 +94,7 @@ jobs:
- name: Set Up JDK
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17

- name: Change wrapper permissions
run: chmod +x ./gradlew
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Use this section to tell people about which versions of your project are
currently being supported with security updates.

| Version | Supported |
| ------- | ------------------ |
|---------|--------------------|
| 5.1.x | :white_check_mark: |
| 5.0.x | :x: |
| 4.0.x | :white_check_mark: |
Expand Down
58 changes: 29 additions & 29 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {

android {
compileSdk = ProjectSetting.PROJECT_COMPILE_SDK
namespace = "com.frogobox.githubaction"
namespace = ProjectSetting.PROJECT_NAME_SPACE

defaultConfig {

Expand All @@ -25,51 +25,51 @@ android {

}

signingConfigs {
create("release") {
// You need to specify either an absolute path or include the
// keystore file in the same directory as the build.gradle file.
// [PROJECT FOLDER NAME/app/[COPY YOUT KEY STORE] .jks in here
storeFile = file(ProjectSetting.KEY_PATH)
storePassword = ProjectSetting.KEY_STORE_PASSWORD
keyAlias = ProjectSetting.KEY_ALIAS
keyPassword = ProjectSetting.KEY_ALIAS_PASSWORD
signingConfigs {
create("release") {
// You need to specify either an absolute path or include the
// keystore file in the same directory as the build.gradle file.
// [PROJECT FOLDER NAME/app/[COPY YOUT KEY STORE] .jks in here
storeFile = file(ProjectSetting.KEY_PATH)
storePassword = ProjectSetting.KEY_STORE_PASSWORD
keyAlias = ProjectSetting.KEY_ALIAS
keyPassword = ProjectSetting.KEY_ALIAS_PASSWORD
}
}
}

buildTypes {
getByName("release") {
isMinifyEnabled = false
buildTypes {
getByName("release") {
isMinifyEnabled = false

// Disable Debug Mode
isDebuggable = false
isJniDebuggable = false
isRenderscriptDebuggable = false
isPseudoLocalesEnabled = false
// Disable Debug Mode
isDebuggable = false
isJniDebuggable = false
isRenderscriptDebuggable = false
isPseudoLocalesEnabled = false

proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)

// Generated Signed APK / AAB
signingConfig = signingConfigs.getByName("release")
// Generated Signed APK / AAB
signingConfig = signingConfigs.getByName("release")

}
}
}

buildFeatures {
viewBinding = true
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = "11"
jvmTarget = "17"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id("com.android.application") version "7.4.2" apply false
id("com.android.library") version "7.4.2" apply false
id("com.android.application") version "8.0.0" apply false
id("com.android.library") version "8.0.0" apply false
id("org.jetbrains.kotlin.android") version Dependency.KOTLIN_VERSION apply false
}

Expand Down
7 changes: 4 additions & 3 deletions buildSrc/src/main/kotlin/ProjectSetting.kt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/**
* Created by faisalamir on 19/09/21
* FrogoRecyclerView
* -----------------------------------------
Expand Down Expand Up @@ -42,12 +42,13 @@ object ProjectSetting {
const val PROJECT_TARGET_SDK = PROJECT_COMPILE_SDK

const val PROJECT_APP_ID = "$APP_DOMAIN.$APP_PLAY_CONSOLE.$APP_NAME"
const val PROJECT_NAME_SPACE = "com.frogobox.githubaction"
const val PROJECT_VERSION_CODE = (VERSION_MAJOR * 100) + (VERSION_MINOR * 10) + (VERSION_PATCH * 1)
const val PROJECT_VERSION_NAME = "$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH"

// Declaration apk / aab name
val NAME_APK = NAME_APP.toLowerCase().replace(" ", "-")
val NAME_DB = NAME_APP.toLowerCase().replace(" ", "_")
val NAME_APK = NAME_APP.lowercase().replace(" ", "-")
val NAME_DB = NAME_APP.lowercase().replace(" ", "_")
val DB = "\"$NAME_DB.db\""

}
4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ kotlin.code.style=official
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
android.nonTransitiveRClass=true
android.defaults.buildfeatures.buildconfig=true
android.nonFinalResIds=false
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Feb 11 12:32:43 WIB 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

0 comments on commit 3f71e71

Please sign in to comment.