Tag: java

How do I get my current build commit's sha1 in Android Studio?

How can I access the current build commit’s sha1 of my project from Java code? This is preferred but not obligatory: Getting the shortened version of sha1 (say, 6 first chars) A solution without any side libraries or frameworks I’m using OS.X v. 10.10, Android Studio v. 1.2.2.

Tracking changes between master and project branches

Our QA team wants to know what areas we have changed between revisions and the possible UI locations these changes can affect. Right now each developer is in charge of writing this out on their own tickets. Then at the end of that project we use git to generate a diff of this branch vs […]

How to publish a java project source files on GIT?

I want to start moving some of my projects onto github repos. I’m a little overwhelmed on how to organize the files on these repos. I want to make sure I do this right. The specific project I’ve been working on is a Java project I’ve been building in Eclipse. It is essentially an ‘engine’ […]

Getting errors with ant in netbeans, but no meaningful error message is produced

I am pretty new to Java EE and Netbeans in general. I am getting errors with my build-impl.xml file when I am trying to deploy a project to glassfish. The project consists of a client folder, an ejb folder and a common folder. <ant antfile=”${project.202-slit-ejb}/build.xml” inheritall=”false” target=”dist-ear”> <property location=”${build.dir}” name=”dist.ear.dir”/> <property name=”deploy.on.save” value=”${build.deploy.on.save}”/> </ant> <ant […]

Volley .jar Gradle Build Failure

I’m trying to build the latest version of Volley from https://android.googlesource.com/platform/frameworks/volley/ into a .jar. When I cd into the git folder and run gradle build –stacktrace I get the following error: * Exception is: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ‘:javadoc’. at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46) at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35) at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64) at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58) at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52) at […]

Setting up Libgdx project with git

I want to manage a Libgdx project with my friend. I heard i can do this using git. So… how do i do this with a libgdx project? I have tried doing it with dropbox – probably not a good idea, because it said that libraries are missing on friend’s pc. Martynas

How to automatically fill in @version tags in javadoc?

I’m writing in Java using Maven for project building and Git for source control. In javadocs, I would like to follow the recommendaton of having the last version when a source file was changed in the @version tag. If I were to do this manually, that would be a lot of work. How do I […]

Jenkins – Setting up local Git repository for simple HelloWorld test

If someone could give me some guidance on this it would be much appreciated! I’ve seen similar questions asked on here before but I can’t seem to find an answer or get my head around the process. What I want to do is set up a Git repository in which 2 Java files are located […]

jGit clone remote git respository from Java

I am using the below java code to clone a git repo. localRepo = new FileRepository(“/Users/myfolder/git” + “/.git”); git = new Git(localRepo); Git.cloneRepository().setURI(“git@github.com:mygit/TestGit.git”) .setDirectory(new File(“/Users/myfolder/git”)).call(); I can see the project cloned in the folder /Users/myfolder/git, but in the console log I see the exception fatal: Could not switch to Any idea why the exception is […]

Distribution of java class library code

I need to put some old java class library code that I have into a repo, from where others can check it out and build it. You know, like any public repo. But, I’m not sure what the best way to do this is in the java world. In old-fashioned projects, we just used to […]

Git Baby is a git and github fan, let's start git clone.