Skip to content

fix(build): Correct dependencies of cleanupAllJars gradle task #1338

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

Merged
merged 1 commit into from
Apr 3, 2019

Conversation

mbektchiev
Copy link
Contributor

@mbektchiev mbektchiev commented Apr 2, 2019

Cloud builds started suffering from too many copies of the same JARs
because the full path of GRADLE_USER_HOME (and subsequently the full
paths to those JARs) are different with each build

@mbektchiev mbektchiev added the bug label Apr 2, 2019
@mbektchiev mbektchiev added this to the 5.3.0 milestone Apr 2, 2019
@mbektchiev mbektchiev self-assigned this Apr 2, 2019
@cla-bot cla-bot bot added the cla: yes label Apr 2, 2019
@mbektchiev mbektchiev changed the base branch from master to release April 2, 2019 15:07
@mbektchiev mbektchiev modified the milestones: 5.3.0, 5.3.1 Apr 2, 2019
@mbektchiev mbektchiev force-pushed the bektchiev/fix-sbg-jars-deps branch 2 times, most recently from c038bf7 to c8b5e4c Compare April 3, 2019 08:52
@mbektchiev mbektchiev changed the title fix(build): Generate exploded-dependencies hash from JAR contents fix(build): Correct dependencies of cleanupAllJars gradle task Apr 3, 2019
Cloud builds started suffering from too many copies of the same JARs
because the full path of GRADLE_USER_HOME (and subsequently the full
paths to those JARs) are different with each build
@mbektchiev mbektchiev force-pushed the bektchiev/fix-sbg-jars-deps branch from c8b5e4c to b49b016 Compare April 3, 2019 10:15
@mbektchiev mbektchiev merged commit a22f2cf into release Apr 3, 2019
@ghost ghost removed the bug label Apr 3, 2019
@mbektchiev mbektchiev deleted the bektchiev/fix-sbg-jars-deps branch April 3, 2019 11:52
@mbektchiev
Copy link
Contributor Author

Steps to reproduce the issue with [email protected]:

  1. tns create --js testCleanup; cd testCleanup
  2. tns prepare android; cd platforms/android
  3. ./gradlew runSbg
  4. ./gradlew runSbg -i | tee build1.out -> notice that Task :app:cleanupAllJars UP-TO-DATE -this is OK since nothing has changed since the previous build was done
  5. mv ~/.gradle ~/.gradle2; export GRADLE_USER_HOME=~/.gradle2
  6. ./gradlew runSbg -i | tee build2.out -> notice that again Task :app:cleanupAllJars UP-TO-DATE - this is not OK and as a result you will see duplicated jars in app/build/exploded-dependencies/
  7. ls -lS $(find app/build/exploded-dependencies/ -iname *.jar)

If you perform steps from 5 to 7 once again the files will be added for a 3rd time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants