-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
51 changed files
with
1,193 additions
and
392 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Android CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
paths: | ||
- '**/WorkflowsTrigger.kt' | ||
|
||
env: | ||
TZ: Asia/Shanghai | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: set up jdk 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: "17" | ||
distribution: "oracle" | ||
cache: gradle | ||
|
||
- name: grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|
||
- name: build apk with gradle | ||
run: ./gradlew app:assembleRelease | ||
|
||
- name: get current time | ||
id: currentTime | ||
run: echo "time=$(date +'%Y.%m.%d')" >> $GITHUB_OUTPUT | ||
|
||
- name: create a release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: "app/build/outputs/apk/release/*.apk" | ||
body: "create by workflows" | ||
allowUpdates: true | ||
artifactErrorsFailBuild: true | ||
generateReleaseNotes: false | ||
token: ${{ secrets.ACTION_TOKEN }} | ||
name: v${{ steps.currentTime.outputs.time }} | ||
tag: ${{ steps.currentTime.outputs.time }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,10 @@ | ||
*.iml | ||
.gradle | ||
/local.properties | ||
/.idea/caches/build_file_checksums.ser | ||
/.idea/libraries | ||
/.idea/modules.xml | ||
/.idea/workspace.xml | ||
/.idea/ | ||
.DS_Store | ||
/build | ||
/captures | ||
.externalNativeBuild | ||
/.idea | ||
.idea | ||
*.apk | ||
*.json | ||
.cxx | ||
local.properties |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# Activity | ||
|
||
用于查看设备安装的所有应用的详细信息,并且可以查看当前系统顶层 Activity 的全路径,方便在反编译应用的时候快速定位 | ||
|
||
Apk 下载体验请看:[Releases](https://github.com/leavesCZY/Activity/releases) | ||
用于查看系统中安装的所有应用的详细信息,且可以查看当前顶层 Activity 的全路径,方便在反编译应用的时候快速定位 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
/build | ||
*.apk | ||
*.json | ||
/release/ |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
import com.android.build.gradle.internal.api.ApkVariantOutputImpl | ||
import java.text.SimpleDateFormat | ||
import java.util.Calendar | ||
import java.util.Locale | ||
import java.util.TimeZone | ||
|
||
plugins { | ||
alias(libs.plugins.android.application) | ||
alias(libs.plugins.kotlin.android) | ||
} | ||
|
||
android { | ||
namespace = "github.leavesczy.activity" | ||
compileSdk = 34 | ||
defaultConfig { | ||
applicationId = "github.leavesczy.activity" | ||
minSdk = 23 | ||
targetSdk = 34 | ||
versionCode = 1 | ||
versionName = "1.0.0" | ||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
vectorDrawables { | ||
useSupportLibrary = true | ||
} | ||
applicationVariants.all { | ||
val variant = this | ||
outputs.all { | ||
if (this is ApkVariantOutputImpl) { | ||
val simpleDateFormat = SimpleDateFormat("yyyy_MM_dd_HH_mm_ss", Locale.US) | ||
simpleDateFormat.timeZone = TimeZone.getTimeZone("Asia/Shanghai") | ||
val currentTime = Calendar.getInstance().time | ||
val apkBuildTime = simpleDateFormat.format(currentTime) | ||
this.outputFileName = | ||
"activity_${variant.name}_v${variant.versionName}_${variant.versionCode}_${apkBuildTime}.apk" | ||
} | ||
} | ||
} | ||
} | ||
signingConfigs { | ||
create("release") { | ||
storeFile = | ||
File(rootDir.absolutePath + File.separator + "doc" + File.separator + "key.jks") | ||
keyAlias = "leavesCZY" | ||
keyPassword = "123456" | ||
storePassword = "123456" | ||
enableV1Signing = true | ||
enableV2Signing = true | ||
} | ||
} | ||
buildTypes { | ||
debug { | ||
signingConfig = signingConfigs.getByName("release") | ||
isMinifyEnabled = false | ||
isShrinkResources = false | ||
isDebuggable = true | ||
proguardFiles( | ||
getDefaultProguardFile("proguard-android-optimize.txt"), | ||
"proguard-rules.pro" | ||
) | ||
} | ||
release { | ||
signingConfig = signingConfigs.getByName("release") | ||
isMinifyEnabled = true | ||
isShrinkResources = true | ||
isDebuggable = 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" | ||
} | ||
packaging { | ||
jniLibs { | ||
excludes += setOf("META-INF/{AL2.0,LGPL2.1}") | ||
} | ||
resources { | ||
excludes += setOf( | ||
"**/*.version", | ||
"DebugProbesKt.bin", | ||
"kotlin-tooling-metadata.json", | ||
) | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
testImplementation(libs.junit) | ||
androidTestImplementation(libs.androidx.junit) | ||
androidTestImplementation(libs.androidx.espresso.core) | ||
implementation(libs.androidx.appcompat) | ||
implementation(libs.androidx.constraintlayout) | ||
implementation(libs.androidx.recyclerview) | ||
implementation(libs.androidx.lifecycle.runtime) | ||
implementation(libs.google.material) | ||
implementation(libs.kotlinx.coroutines) | ||
} |
Oops, something went wrong.