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

Setup CI pipeline #104

Closed
vestrel00 opened this issue Nov 4, 2021 · 3 comments
Closed

Setup CI pipeline #104

vestrel00 opened this issue Nov 4, 2021 · 3 comments
Assignees
Labels
build Build, Gradle, Android Studio, Dependencies

Comments

@vestrel00
Copy link
Owner

vestrel00 commented Nov 4, 2021

Continuous Delivery (CD) is already done using JitPack. Might as well use it for Continue Integration (CI) too 😁.

https://jitpack.io/docs/#continuous-integration-ci

Screen Shot 2021-11-04 at 9 47 19 AM

@vestrel00 vestrel00 added the code quality This is about code quality and static analysis label Nov 4, 2021
This was referenced Nov 4, 2021
@vestrel00 vestrel00 self-assigned this Dec 17, 2021
@vestrel00
Copy link
Owner Author

vestrel00 commented Dec 17, 2021

Having some issues getting this to work on JitCI. I'm getting these errors;

> Task :listDeps
106.	Dependencies: 0 in project 'contacts-android'
107.	
108.	> Task :core:initAndroidSdk
109.	Android detected in project: core
110.	Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2
111.	Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
112.		at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
113.		at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
114.		at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
115.		at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:73)
116.		at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)
117.	Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
118.		at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
119.		at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
120.		at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
121.		... 5 more
122.	Error initialising Android SDK: class org.gradle.process.internal.ExecException - Process 'command 'sh'' finished with non-zero exit value 1
123.	

Doing some google searches revealed that I either need to downgrade to Java 8 (which I can't do because this project's build tools require Java 11) OR use the command line tools to accept the licenses (but the tools are not in the virtual machine...

It's an interesting error because the actual Gradle build of the project succeeds. It's just these extra listDeps and initAndroidSdk commands that are failing.

@vestrel00
Copy link
Owner Author

Okay... So, just not executing the default "Init" stage commands did the trick!
Screen Shot 2021-12-17 at 1 26 01 PM
I'm guessing those commands are no longer needed for Java 11 Android projects 🤷

I did not find this solution from Google searching. Maybe no one really uses JitCI? Strange... it is such a convenient, heavily Github-integrated service.

@vestrel00
Copy link
Owner Author

It is currently setup to build on push and the build is green so I'll close this issue! We might have to migrate to a different CI pipeline later or maybe not. For now, this should do. Each commit will show a ✅ if the build succeeds =)

P.S. The badge is grey and it just says "None", so I won't add it to the README. 😢 I was looking forward to adding another badge!

Seems like there is an issue about this; jitpack/jitci#18

@vestrel00 vestrel00 added build Build, Gradle, Android Studio, Dependencies and removed code quality This is about code quality and static analysis labels Dec 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Build, Gradle, Android Studio, Dependencies
Projects
None yet
Development

No branches or pull requests

1 participant