-
Notifications
You must be signed in to change notification settings - Fork 344
Create gradle.yml #74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Loboazteca88
wants to merge
2
commits into
KhunHtetzNaing:master
Choose a base branch
from
Loboazteca88:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Empty file.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
This file contains hidden or 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,137 @@ | ||
| import com.github.javafaker.Faker; | ||
|
|
||
| import java.security.SecureRandom; | ||
| import java.time.LocalDateTime; | ||
| import java.time.format.DateTimeFormatter; | ||
| import java.util.Locale; | ||
| import java.util.UUID; | ||
|
|
||
| public class FrFunction { | ||
| private static final String CHAR_LOWER = "abcdefghijklmnopqrstuvwxyz"; | ||
| private static final String CHAR_UPPER = CHAR_LOWER.toUpperCase(); | ||
| private static final String CHAR_NUMBER = "0123456789"; | ||
| private static final String CHARS_SPECIAL = "!#$%&*()_+-=[]|,.?><"; | ||
| private static final String CHAR_NORMAL = CHAR_LOWER + CHAR_UPPER + CHAR_NUMBER; | ||
|
|
||
| private static final SecureRandom RANDOM = new SecureRandom(); | ||
| private static final Faker FAKER = new Faker(Locale.CHINA); | ||
|
|
||
| /** | ||
| * 随机一个数字 | ||
| */ | ||
| public int randomInt() { | ||
| return RANDOM.nextInt(100); | ||
| } | ||
|
|
||
| /** | ||
| * 随机一个布尔值 | ||
| */ | ||
| public boolean randomBoolean() { | ||
| return RANDOM.nextBoolean(); | ||
| } | ||
|
|
||
| /** | ||
| * 随机一个浮点数 | ||
| */ | ||
| public float randomFloat() { | ||
| return RANDOM.nextFloat(); | ||
| } | ||
|
|
||
| /** | ||
| * 随机一个字符 | ||
| */ | ||
| public char randomChar() { | ||
| return CHAR_LOWER.charAt(RANDOM.nextInt(26)); | ||
| } | ||
|
|
||
| /** | ||
| * 随机一个中文字符 | ||
| */ | ||
| public char randomChineseChar() { | ||
| return (char) (0x4E00 + RANDOM.nextInt(0x9FFF - 0x4E00 + 1)); | ||
| } | ||
|
|
||
| /** | ||
| * 随机一个uuid | ||
| */ | ||
| public String uuid() { | ||
| return UUID.randomUUID().toString(); | ||
| } | ||
|
|
||
| /** | ||
| * 随机十位长度的字符串 | ||
| */ | ||
| public String randomString() { | ||
| StringBuilder sb = new StringBuilder(10); | ||
| for (int i = 0; i < 10; i++) { | ||
| int randomIndex = RANDOM.nextInt(CHAR_NORMAL.length()); | ||
| sb.append(CHAR_NORMAL.charAt(randomIndex)); | ||
| } | ||
| return sb.toString(); | ||
| } | ||
|
|
||
| /** | ||
| * 当前时间yyyy-MM-dd HH:mm:ss | ||
| */ | ||
| public String dateTime() { | ||
| return LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); | ||
| } | ||
|
|
||
| /** | ||
| * 当前日期yyyy-MM-dd | ||
| */ | ||
| public String date() { | ||
| return LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); | ||
| } | ||
|
|
||
| /** | ||
| * 当前时间HH:mm:ss | ||
| */ | ||
| public String time() { | ||
| return LocalDateTime.now().format(DateTimeFormatter.ofPattern("HH:mm:ss")); | ||
| } | ||
|
|
||
| /** | ||
| * 当前时间戳 | ||
| */ | ||
| public long currentTimeMillis() { | ||
| return System.currentTimeMillis(); | ||
| } | ||
|
|
||
| /** | ||
| * 地址 | ||
| */ | ||
| public String address() { | ||
| return FAKER.address().fullAddress(); | ||
| } | ||
|
|
||
|
|
||
| /** | ||
| * 姓名 | ||
| */ | ||
| public String name() { | ||
| return FAKER.name().name(); | ||
| } | ||
|
|
||
| /** | ||
| * 邮箱 | ||
| */ | ||
| public String email() { | ||
| return FAKER.internet().emailAddress(); | ||
| } | ||
|
|
||
| /** | ||
| * 手机号 | ||
| */ | ||
| public String phone() { | ||
| return FAKER.phoneNumber().cellPhone(); | ||
| } | ||
|
|
||
| /** | ||
| * 密码 | ||
| */ | ||
| public String password() { | ||
| return FAKER.internet().password(); | ||
| } | ||
|
|
||
| } |
This file contains hidden or 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,47 @@ | ||
| { | ||
| "apiDocTemplate":"#if (${namingPolicy}=='byDoc')\n$H1 ${methodDescription}\n#else\n$H1 $!{methodName}\n\n$H3 Method description\n\n```\n$!{methodDescription}\n```\n#end\n\n> URL: $!{url}\n>\n> Origin Url: $!{originUrl}\n>\n> Type: $!{methodType}\n\n\n$H3 Request headers\n\n|Header Name| Header Value|\n|---------|------|\n#foreach( $h in ${headerList})\n|$h.type|$h.value|\n#end\n\n$H3 Parameters\n\n$H5 Path parameters\n\n| Parameter | Type | Value | Description |\n|---------|------|------|------------|\n#foreach( $node in ${pathKeyValueList})\n|$node.key|$!{node.type}|$!{node.value}|$!{node.comment}|\n#end\n\n\n$H5 URL parameters\n\n|Required| Parameter | Type | Value | Description |\n|---------|---------|------|------|------------|\n#foreach( $node in ${urlParamsKeyValueList})\n|$!{node.enabled}|$!{node.key}|$!{node.type}|$!{node.value}|$!{node.comment}|\n#end\n\n\n$H5 Body parameters\n\n$H6 JSON\n\n```\n${jsonParam}\n```\n\n$H6 JSON document\n\n```\n${jsonParamDocument}\n```\n\n\n$H5 Form URL-Encoded\n|Required| Parameter | Type | Value | Description |\n|---------|---------|------|------|------------|\n#foreach( $node in ${urlEncodedKeyValueList})\n|$!{node.enabled}|$!{node.key}|$!{node.type}|$!{node.value}|$!{node.comment}|\n#end\n\n\n$H5 Multipart\n|Required | Parameter | Type | Value | Description |\n|---------|---------|------|------|------------|\n#foreach( $node in ${multipartKeyValueList})\n|$!{node.enabled}|$!{node.key}|$!{node.type}|$!{node.value}|$!{node.comment}|\n#end\n\n\n$H3 Response\n\n$H5 Response example\n\n```\n$!{responseExample}\n```\n\n$H5 Response document\n```\n$!{returnDocument}\n```\n\n\n", | ||
| "apifoxSetting":{ | ||
| "domain":"https://api.apifox.com", | ||
| "syncAfterSave":false | ||
| }, | ||
| "dataList":[ | ||
| { | ||
| "hostGroup":[ | ||
| { | ||
| "env":"lo1", | ||
| "url":"" | ||
| } | ||
| ], | ||
| "name":"ADB-OTG.adblib.androidTest" | ||
| } | ||
| ], | ||
| "envList":[ | ||
| "lo1" | ||
| ], | ||
| "headerList":[], | ||
| "ignoreParseFieldList":[], | ||
| "maxDescriptionLength":-1, | ||
| "pmCollectionId":"", | ||
| "postScript":"", | ||
| "preScript":"", | ||
| "projectList":[ | ||
| "ADB-OTG.adblib.androidTest" | ||
| ], | ||
| "syncModel":{ | ||
| "branch":"master", | ||
| "domain":"https://github.com", | ||
| "enabled":true, | ||
| "gitToken":"", | ||
| "namingPolicy":"byDoc", | ||
| "owner":"", | ||
| "repo":"", | ||
| "repoUrl":"", | ||
| "syncAfterRun":true, | ||
| "type":"github" | ||
| }, | ||
| "syncPmAfterSave":false, | ||
| "urlEncodedKeyValueList":[], | ||
| "urlParamsKeyValueList":[], | ||
| "urlSuffix":"", | ||
| "workspaceId":"" | ||
| } |
6 changes: 6 additions & 0 deletions
6
.fastRequest/config/fastRequestCurrentProjectEnvironment.json
This file contains hidden or 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,6 @@ | ||
| { | ||
| "apifoxRelationMap":{}, | ||
| "apifoxServerMap":{}, | ||
| "environment":{}, | ||
| "pmRelationMap":{} | ||
| } |
This file contains hidden or 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,67 @@ | ||
| # This workflow uses actions that are not certified by GitHub. | ||
| # They are provided by a third-party and are governed by | ||
| # separate terms of service, privacy policy, and support | ||
| # documentation. | ||
| # This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time | ||
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle | ||
|
|
||
| name: Java CI with Gradle | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "master" ] | ||
| pull_request: | ||
| branches: [ "master" ] | ||
|
|
||
| jobs: | ||
| build: | ||
|
|
||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up JDK 17 | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: '17' | ||
| distribution: 'temurin' | ||
|
|
||
| # Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies. | ||
| # See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md | ||
| - name: Setup Gradle | ||
| uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 | ||
|
|
||
| - name: Build with Gradle Wrapper | ||
| run: ./gradlew build | ||
|
|
||
| # NOTE: The Gradle Wrapper is the default and recommended way to run Gradle (https://docs.gradle.org/current/userguide/gradle_wrapper.html). | ||
| # If your project does not have the Gradle Wrapper configured, you can use the following configuration to run Gradle with a specified version. | ||
| # | ||
| # - name: Setup Gradle | ||
| # uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 | ||
| # with: | ||
| # gradle-version: '8.9' | ||
| # | ||
| # - name: Build with Gradle 8.9 | ||
| # run: gradle build | ||
|
|
||
| dependency-submission: | ||
|
|
||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up JDK 17 | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: '17' | ||
| distribution: 'temurin' | ||
|
|
||
| # Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies. | ||
| # See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md | ||
| - name: Generate and submit dependency graph | ||
| uses: gradle/actions/dependency-submission@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adb shell pm uninstall PACKAGE