mirror of
				https://github.com/TeamNewPipe/NewPipe
				synced 2025-10-31 15:23:00 +00:00 
			
		
		
		
	Merge pull request #6858 from XiangRongLin/ci_ktlint
Add gradle parameter to skip formatKtLint and use in CI
This commit is contained in:
		
							
								
								
									
										5
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							| @@ -46,11 +46,8 @@ jobs: | ||||
|           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | ||||
|           restore-keys: ${{ runner.os }}-gradle | ||||
|            | ||||
|       - name: Check if kotlin files are formatted correctly | ||||
|         run: ./gradlew runKtlint | ||||
|  | ||||
|       - name: Build debug APK and run jvm tests | ||||
|         run: ./gradlew assembleDebug lintDebug testDebugUnitTest --stacktrace | ||||
|         run: ./gradlew assembleDebug lintDebug testDebugUnitTest --stacktrace -DskipFormatKtlint | ||||
|  | ||||
|       - name: Upload APK | ||||
|         uses: actions/upload-artifact@v2 | ||||
|   | ||||
| @@ -165,7 +165,10 @@ task formatKtlint(type: JavaExec) { | ||||
| } | ||||
|  | ||||
| afterEvaluate { | ||||
|     preDebugBuild.dependsOn formatKtlint, runCheckstyle, runKtlint | ||||
|     if (!System.properties.containsKey('skipFormatKtlint')) { | ||||
|         preDebugBuild.dependsOn formatKtlint | ||||
|     } | ||||
|     preDebugBuild.dependsOn runCheckstyle, runKtlint | ||||
| } | ||||
|  | ||||
| sonarqube { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 XiangRongLin
					XiangRongLin