diff --git a/FMworkflows/android.yml b/FMworkflows/android.yml new file mode 100644 index 0000000..740c2ee --- /dev/null +++ b/FMworkflows/android.yml @@ -0,0 +1,26 @@ +name: Android CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + cache: gradle + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build with Gradle + run: ./gradlew build diff --git a/FMworkflows/autoupdate.yml b/FMworkflows/autoupdate.yml new file mode 100644 index 0000000..2e1ac41 --- /dev/null +++ b/FMworkflows/autoupdate.yml @@ -0,0 +1,29 @@ +name: autoupdate + +on: + # 推送代码后触发 + push: + # 定时任务触发,使用 cron 规则,这里默认一小时执行一次 '0 * * * *' '0 */6 * * *' 12小时 + + schedule: + - cron: '0 */6 * * *' + workflow_dispatch: + +jobs: + merge: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Merge upstream + run: | + # 使用自己的用户名替换 username + git config --global user.name 'dlgt7' + git config --global user.email '120@qq.com' + git pull --unshallow + # 自行替换要同步的上游仓库地址 + git remote add upstream https://github.com/FongMi/CatVodSpider.git + git fetch upstream + git checkout main + git merge upstream/main + git pull origin main + git push origin main diff --git a/FMworkflows/build.gradle b/FMworkflows/build.gradle new file mode 100644 index 0000000..061985c --- /dev/null +++ b/FMworkflows/build.gradle @@ -0,0 +1,47 @@ +plugins { + id 'com.android.application' + id 'ru.cleverpumpkin.proguard-dictionaries-generator' +} + +android { + compileSdk 33 + + defaultConfig { + applicationId "com.github.catvod.demo" + minSdk 17 + targetSdk 28 + buildConfigField("String", "CLIENT_ID", "\"${clientId}\"") + multiDexEnabled true + } + + buildTypes { + release { + minifyEnabled true + proguardFiles 'proguard-rules.pro' + proguardDictionaries { + dictionaryNames = ["build/class-dictionary", "build/package-dictionary", "build/obfuscation-dictionary"] + minLineLength 1 + maxLineLength 3 + linesCountInDictionary 100000 + } + } + } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} + +dependencies { + implementation('com.github.thegrizzlylabs:sardine-android:0.8') { exclude group: 'com.squareup.okhttp3', module: 'okhttp' } + implementation 'com.googlecode.juniversalchardet:juniversalchardet:1.0.3' + implementation 'wang.harlon.quickjs:wrapper-android:0.21.1' + implementation 'com.squareup.okhttp3:okhttp:3.12.13' + implementation 'com.google.code.gson:gson:2.8.6' + implementation 'cn.wanghaomiao:JsoupXpath:2.5.1' + implementation 'org.nanohttpd:nanohttpd:2.3.1' + implementation 'com.google.zxing:core:3.3.0' + //implementation 'com.orhanobut:logger:2.2.0' + implementation 'org.jsoup:jsoup:1.15.3' +} \ No newline at end of file diff --git a/FMworkflows/gradle.yml b/FMworkflows/gradle.yml new file mode 100644 index 0000000..db3e248 --- /dev/null +++ b/FMworkflows/gradle.yml @@ -0,0 +1,27 @@ +name: Spider Jar Gen + +on: workflow_dispatch + +jobs: + build: + + runs-on: windows-latest + + steps: + - uses: actions/checkout@v2 + - name: set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'adopt' + cache: gradle + + - name: Build with Gradle + run: ./build.bat ec + + - name: Update spider jar + uses: EndBug/add-and-commit@v7 + with: + default_author: github_actions + message: 'update spider jar' + add: "['./jar/custom_spider.jar', './jar/custom_spider.jar.md5']"