Skip to content
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

Don't register checkIntegrityBetweenArchitectures task when installed as a dependency #2953

Merged
merged 2 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check-paper-integrity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
if: github.repository == 'software-mansion/react-native-gesture-handler'
runs-on: ubuntu-latest
concurrency:
group: kotlin-lint-${{ github.ref }}
group: check-paper-integrity-${{ github.ref }}
cancel-in-progress: true
steps:
- name: checkout
Expand Down
30 changes: 14 additions & 16 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -289,26 +289,24 @@ if (isGHExampleApp() && isNewArchitectureEnabled() && !project.hasProperty('skip
tasks.generateCodegenArtifactsFromSchema.finalizedBy('copyCodegenArtifacts')
}

tasks.register('checkIntegrityBetweenArchitectures') {
group 'Verification tasks'
description 'Task to check integrity between fabric and paper architecture in terms of codegen generated interfaces/delegates'

if (isGHExampleApp()) {
return
}
if (project == rootProject) {
tasks.register('checkIntegrityBetweenArchitectures') {
group 'Verification tasks'
description 'Task to check integrity between fabric and paper architecture in terms of codegen generated interfaces/delegates'

def absoluteCodegenArtifactsPaperDestination = "../${project.property('codegenArtifactsPaperDestination')}"
def absoluteCodegenArtifactsSource = "../${project.property('codegenArtifactsSource')}"
def absoluteCodegenArtifactsPaperDestination = "../${project.property('codegenArtifactsPaperDestination')}"
def absoluteCodegenArtifactsSource = "../${project.property('codegenArtifactsSource')}"

def existingFiles = fileTree(absoluteCodegenArtifactsPaperDestination).matching {
include '**/*.java'
}
def existingFiles = fileTree(absoluteCodegenArtifactsPaperDestination).matching {
include '**/*.java'
}

existingFiles.forEach { existingFile ->
def generatedFile = new File("${absoluteCodegenArtifactsSource}/${existingFile.name}")
existingFiles.forEach { existingFile ->
def generatedFile = new File("${absoluteCodegenArtifactsSource}/${existingFile.name}")

if (existingFile.text != generatedFile.text) {
throw new RuntimeException("[react-native-gesture-handler] The source of ${existingFile.name} does not match with the one generated by codegen. Please check if you commited changes produced by copyCodegenArtifacts task.")
if (existingFile.text != generatedFile.text) {
throw new RuntimeException("[react-native-gesture-handler] The source of ${existingFile.name} does not match with the one generated by codegen. Please check if you commited changes produced by copyCodegenArtifacts task.")
}
}
}
}
Loading