diff --git a/btypes_big_integer/build.gradle b/btypes_big_integer/build.gradle
index 634f6795267c74392a63376b1bb2785fa9637ce0..dd02bb8c8f92110c0fbc59ab1dec241cccc431af 100644
--- a/btypes_big_integer/build.gradle
+++ b/btypes_big_integer/build.gradle
@@ -2,7 +2,9 @@ apply plugin: 'java'
 apply plugin: 'eclipse'
 apply plugin: 'idea'
 
-project.archivesBaseName = "${rootProject.name}-btypes"
+base {
+    archivesName = "${rootProject.name}-btypes"
+}
 
 repositories {
     mavenCentral()
@@ -17,6 +19,11 @@ dependencies {
     testImplementation 'junit:junit:4.8.2'
 }
 
+java {
+    sourceCompatibility = 1.8
+    targetCompatibility = 1.8
+}
+
 task fatJar(type: Jar) {
     archivesBaseName = project.name + '-all'
     from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
@@ -35,10 +42,6 @@ tasks.withType(JavaCompile) {
     options.compilerArgs << "-Xlint:unchecked"
 }
 
-
-sourceCompatibility = 1.8
-targetCompatibility = 1.8
-
 sourceSets.main.java.srcDirs = ['src/main/java']
 
 sourceSets.test.runtimeClasspath += files(sourceSets.main.java.srcDirs)
diff --git a/btypes_primitives/build.gradle b/btypes_primitives/build.gradle
index 50adf72e3a41a35348ac1f6cf362e6a5dccd5561..dd02bb8c8f92110c0fbc59ab1dec241cccc431af 100644
--- a/btypes_primitives/build.gradle
+++ b/btypes_primitives/build.gradle
@@ -2,7 +2,9 @@ apply plugin: 'java'
 apply plugin: 'eclipse'
 apply plugin: 'idea'
 
-project.archivesBaseName = "${rootProject.name}-btypes"
+base {
+    archivesName = "${rootProject.name}-btypes"
+}
 
 repositories {
     mavenCentral()
@@ -17,6 +19,11 @@ dependencies {
     testImplementation 'junit:junit:4.8.2'
 }
 
+java {
+    sourceCompatibility = 1.8
+    targetCompatibility = 1.8
+}
+
 task fatJar(type: Jar) {
     archivesBaseName = project.name + '-all'
     from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
@@ -35,9 +42,6 @@ tasks.withType(JavaCompile) {
     options.compilerArgs << "-Xlint:unchecked"
 }
 
-sourceCompatibility = 1.8
-targetCompatibility = 1.8
-
 sourceSets.main.java.srcDirs = ['src/main/java']
 
 sourceSets.test.runtimeClasspath += files(sourceSets.main.java.srcDirs)
diff --git a/build.gradle b/build.gradle
index 1d9cbb16e569fd0f7fa6264a6bcb715b80bc99d0..bff8ae4a82f937f576e930d176d143b5c50cd047 100644
--- a/build.gradle
+++ b/build.gradle
@@ -4,11 +4,12 @@ apply plugin: 'antlr'
 apply plugin: 'eclipse'
 apply plugin: 'idea'
 
-project.archivesBaseName = 'B2Program'
 project.version = '0.1.0-SNAPSHOT' // If no snapshot, adapt ANTLR parser tag to git revision
 project.group = 'de.hhu.stups'
 
-mainClassName = 'de.hhu.stups.codegenerator.CodeGenerator'
+base {
+    archivesName = 'B2Program'
+}
 
 repositories {
     mavenCentral()
@@ -30,6 +31,15 @@ dependencies {
     testImplementation 'junit:junit:4.13.2'
 }
 
+java {
+    sourceCompatibility = 1.8
+    targetCompatibility = 1.8
+}
+
+application {
+    mainClass = 'de.hhu.stups.codegenerator.CodeGenerator'
+}
+
 test {
     testLogging {
         exceptionFormat = 'full'
@@ -69,9 +79,6 @@ task fatJar(type: Jar) {
     with jar
 }
 
-sourceCompatibility = 1.8
-targetCompatibility = 1.8
-
 sourceSets.main.java.srcDirs = ['src/main/java']
 
 sourceSets.test.runtimeClasspath += files(sourceSets.main.java.srcDirs)