Discuss Scratch

algmwc5
Scratcher
100+ posts

I need help with gradle!

I tried to run
gradlew build
on the Windows Command prompt to build a Scratch Mod's source code but when i tried to do so, it returned the following error:
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'Sharp'.
> The following error occurred while executing this line:
C:\Users\...\.gradle\gradleFx\sdks\bc196171cf31b58c17f327e04508ae764f8ac4a6
\frameworks\downloads.xml:159: Can't get http://swfobject.googlecode.com/files/s
wfobject_2_2.zip to C:\Users\...\.gradle\gradleFx\sdks\bc196171cf31b58c17f327
e04508ae764f8ac4a6\in\swfobject_2_2.zip

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.

BUILD FAILED

Total time: 51.591 secs
i tried to do @mrcomputer1's suggestion to download a copy of the swfobject_2_2.zip file and put it in the bc196171cf31b58c17f327e04508ae764f8ac4a6\in\ directory but it returned the same error
can somebody help?

Mrcomputer1
Scratcher
500+ posts

I need help with gradle!

Try going to
C:\Users\...\.gradle\gradleFx\sdks\bc196171cf31b58c17f327e04508ae764f8ac4a6\frameworks\downloads.xml
and changing
<get src="http://swfobject.googlecode.com/files/swfobject_2_2.zip" 
on line 157 to
<get src="http://web.archive.org/web/20160503140829/https://swfobject.googlecode.com/files/swfobject_2_2.zip" 
and retry
gradlew.bat build

If that does not work then undo the change you made to downloads.xml

EDIT: Use
<get src="https://codeload.github.com/swfobject/swfobject/zip/2.2" 
instead as that is what https://git-wip-us.apache.org/repos/asf/flex-sdk/repo?p=flex-sd…ds/develop#l152 has

Last edited by Mrcomputer1 (Aug. 27, 2016 04:32:18)


My Profile / My User Page / My Talk Page
——————–
Progress bar to 1000+ Posts - Image might not be up to date

——————–
My browser / operating system: Windows NT 10.0 (Windows 11 - 22H2), Firefox 122.0b4
——————–
My ScratchX Extensions——–If you like this post, give me an internet!——–Sharp Scratch Mod
algmwc5
Scratcher
100+ posts

I need help with gradle!

Mrcomputer1 wrote:

Try going to
C:\Users\...\.gradle\gradleFx\sdks\bc196171cf31b58c17f327e04508ae764f8ac4a6\frameworks\downloads.xml
and changing
<get src="http://swfobject.googlecode.com/files/swfobject_2_2.zip" 
on line 157 to
<get src="http://web.archive.org/web/20160503140829/https://swfobject.googlecode.com/files/swfobject_2_2.zip" 
and retry
gradlew.bat build

If that does not work then undo the change you made to downloads.xml
oh, ok

Mrcomputer1
Scratcher
500+ posts

I need help with gradle!

Here is my new fix, which hopefully works this time
  1. Copy scratch.gradle in source code to another location
  2. Right Click -> Save Link As on this link http://mrcomputer1.tk/blog/wp-content/uploads/2016/08/scratch.gradle.txt (save as scratch.gradle no .txt)
  3. Put the scratch.gradle where the old one was
  4. Run gradlew build (wait for complete)
  5. Revert scratch.gradle to old copy

Note: This has not been tested but it should work

Important links (you don't need these - just follow steps above):
scratch.gradle / scratch.gradle.txt
http://mrcomputer1.tk/blog/wp-content/uploads/2016/08/scratch.gradle.txt
apache-flex-sdk-4.10.0-bin.zip
https://www.dropbox.com/s/c6xavx90x3n5aov/apache-flex-sdk-4.10.0-bin.zip?dl=1

Note: I may delete the apache-flex-sdk-4.10.0-bin.zip link to save space on my dropbox. If I do this I will also remove scratch.gradle as it is useless without apache-flex-sdk-4.10.0-bin.zip

Modifications made to files (again you don't need thses - just follow steps above):
scratch.gradle
@ Line 13 of scratch-flash (scratch.gradle)
-        artifactPattern 'http://archive.apache.org/dist/flex/[revision]/binaries/[module]-[revision]-bin.[ext]'
+        artifactPattern 'https://www.dropbox.com/s/c6xavx90x3n5aov/[module]-[revision]-bin.[ext]?dl=1'
apache-flex-sdk-4.10.0-bin.zip/frameworks/downloads.xml
@ Line 157 of Apache Flex SDK 4.10.0 (frameworks/downloads.xml)
-        <get src="http://swfobject.googlecode.com/files/swfobject_2_2.zip" 
+        <get src="https://codeload.github.com/swfobject/swfobject/zip/2.2" 

Last edited by Mrcomputer1 (Aug. 27, 2016 07:22:53)


My Profile / My User Page / My Talk Page
——————–
Progress bar to 1000+ Posts - Image might not be up to date

——————–
My browser / operating system: Windows NT 10.0 (Windows 11 - 22H2), Firefox 122.0b4
——————–
My ScratchX Extensions——–If you like this post, give me an internet!——–Sharp Scratch Mod
noxue
Scratcher
6 posts

I need help with gradle!

move () steps

Powered by DjangoBB