-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
actions: lite version for playstore (fixes open-learning-exchange#2852)…
… (open-learning-exchange#2863) Co-authored-by: dogi <[email protected]>
- Loading branch information
Showing
10 changed files
with
1,124 additions
and
105 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 |
---|---|---|
|
@@ -4,20 +4,40 @@ on: | |
push: | ||
branches: | ||
- 'master' | ||
- '2852-make-special-less-feature-and-free-version-for-google-play' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
release: | ||
name: myPlanet release | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
build: [default, lite] | ||
env: | ||
ANDROID_NDK_VERSION: "21.3.6528147" | ||
BUILD_TOOLS_VERSION: "30.0.2" | ||
|
||
steps: | ||
- name: checkout repository code | ||
uses: actions/checkout@v4 | ||
- name: diff the code to get lite | ||
run: | | ||
if [[ "${{ matrix.build }}" == "lite" ]]; then | ||
echo "lite" | ||
ls -al \ | ||
app/build.gradle \ | ||
app/src/main/AndroidManifest.xml \ | ||
app/src/main/java/org/ole/planet/myplanet/base/BaseContainerFragment.kt \ | ||
app/src/main/java/org/ole/planet/myplanet/base/PermissionActivity.java \ | ||
app/src/main/java/org/ole/planet/myplanet/ui/dashboard/DashboardActivity.java | ||
sed -i 's/\(versionName "[0-9.]\+\)"/\1-lite"/' app/build.gradle | ||
cp app/src/main/AndroidManifest.xml.lite app/src/main/AndroidManifest.xml | ||
cp app/src/main/java/org/ole/planet/myplanet/base/BaseContainerFragment.kt.lite app/src/main/java/org/ole/planet/myplanet/base/BaseContainerFragment.kt | ||
cp app/src/main/java/org/ole/planet/myplanet/base/PermissionActivity.java.lite app/src/main/java/org/ole/planet/myplanet/base/PermissionActivity.java | ||
cp app/src/main/java/org/ole/planet/myplanet/ui/dashboard/DashboardActivity.java.lite app/src/main/java/org/ole/planet/myplanet/ui/dashboard/DashboardActivity.java | ||
fi | ||
- name: set more env | ||
run: echo "BRANCHNAME="${GITHUB_REF##*/} >> $GITHUB_ENV | ||
|
@@ -67,7 +87,7 @@ jobs: | |
ls -alR output | ||
- name: publish AAB to playstore | ||
if: github.ref == 'refs/heads/master' | ||
if: (github.ref == 'refs/heads/master') && (matrix.build == 'lite') | ||
uses: r0adkll/[email protected] | ||
with: | ||
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }} | ||
|
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
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
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,113 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools"> | ||
|
||
<!--<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES"/>--> | ||
<uses-permission | ||
android:name="android.permission.BLUETOOTH" | ||
android:required="false" /> | ||
<uses-permission android:name="android.permission.INTERNET" /> | ||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | ||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" /> | ||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> | ||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | ||
<uses-permission android:name="android.permission.WAKE_LOCK" /> | ||
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /> | ||
<uses-permission android:name="android.permission.SEND_DOWNLOAD_COMPLETED_INTENTS" /> | ||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> | ||
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> | ||
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" /> | ||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> | ||
<uses-permission android:name="android.permission.CAMERA" /> | ||
<uses-permission android:name="android.permission.RECORD_AUDIO" /> | ||
<uses-permission android:name="android.permission.REQUEST_WRITE_PERMISSION" /> | ||
<uses-permission | ||
android:name="android.permission.PACKAGE_USAGE_STATS" | ||
tools:ignore="ProtectedPermissions" /> | ||
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" /> | ||
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" /> | ||
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" /> | ||
|
||
<uses-feature | ||
android:name="android.hardware.camera" | ||
android:required="false" /> | ||
|
||
<application | ||
android:name=".MainApplication" | ||
android:allowBackup="true" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_project_name" | ||
android:largeHeap="true" | ||
android:roundIcon="@mipmap/ic_launcher_round" | ||
android:theme="@style/MyMaterialTheme" | ||
android:usesCleartextTraffic="true" | ||
tools:replace="android:label"> | ||
<activity | ||
android:name=".ui.sync.LoginActivity" | ||
android:exported="false" /> | ||
<activity android:name=".ui.chat.ChatActivity" /> | ||
<activity | ||
android:name=".ui.userprofile.BecomeMemberActivity" | ||
android:theme="@style/AppTheme" /> | ||
<activity | ||
android:name=".ui.course.CourseProgressActivity" | ||
android:theme="@style/AppTheme" /> | ||
<activity | ||
android:name=".ui.news.NewsDetailActivity" | ||
android:label="@string/title_activity_news_detail" | ||
android:theme="@style/MyMaterialTheme.NoActionBar" /> | ||
<activity | ||
android:name=".ui.myhealth.AddMyHealthActivity" | ||
android:theme="@style/AppTheme" /> | ||
<activity | ||
android:name=".ui.myhealth.AddExaminationActivity" | ||
android:theme="@style/AppTheme" /> | ||
<activity android:name=".ui.map.OfflineMapActivity" /> | ||
<activity | ||
android:name=".ui.news.ReplyActivity" | ||
android:theme="@style/AppTheme" /> | ||
<activity | ||
android:name=".ui.library.AddResourceActivity" | ||
android:theme="@style/AppTheme" /> | ||
<activity | ||
android:name=".ui.SplashActivity" | ||
android:exported="true"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
<activity android:name=".ui.viewer.AudioPlayerActivity" /> | ||
<activity | ||
android:name=".ui.feedback.FeedbackDetailActivity" | ||
android:theme="@style/AppTheme" /> | ||
<activity | ||
android:name=".ui.dashboard.DashboardActivity" | ||
android:configChanges="orientation|screenSize|keyboardHidden" | ||
android:label="@string/title_activity_dashboard" | ||
android:theme="@style/FullscreenTheme" /> | ||
<activity android:name=".ui.viewer.PDFReaderActivity" /> | ||
<activity android:name=".ui.viewer.WebViewActivity" /> | ||
<activity android:name=".ui.viewer.VideoPlayerActivity" /> | ||
<activity android:name=".ui.viewer.ImageViewerActivity" /> | ||
<activity android:name=".ui.viewer.TextFileViewerActivity" /> | ||
<activity android:name=".ui.viewer.MarkdownViewerActivity" /> | ||
<activity android:name=".ui.viewer.CSVViewerActivity" /> | ||
<activity | ||
android:name=".ui.dictionary.DictionaryActivity" | ||
android:theme="@style/AppTheme" /> | ||
<activity | ||
android:name=".ui.SettingActivity" | ||
android:theme="@style/AppTheme" /> | ||
<provider | ||
android:name="androidx.core.content.FileProvider" | ||
android:authorities="org.ole.planet.myplanet.fileprovider" | ||
android:exported="false" | ||
android:grantUriPermissions="true"> | ||
<meta-data | ||
android:name="android.support.FILE_PROVIDER_PATHS" | ||
android:resource="@xml/file_paths" /> | ||
</provider> | ||
<service android:name=".datamanager.MyDownloadService" /> | ||
</application> | ||
</manifest> |
Oops, something went wrong.